Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

תÌû£ºPython2.6 Ï°²×° mysql (Windows xp)

ת×Ô£º
http://hi.baidu.com/feng2211/blog/item/8b86b6d9816a3f2710df9b79.html
ºÍ
http://i.19830102.com/archives/164
Python °æ±¾£º2.6
ÏÂÔصØÖ·£ºhttp://www.python.org/download/releases/2.6.1/
ÏÂÔØmsiÎļþ²¢°²×°
MySQLdb°æ±¾£º MySQL-python-1.2.2.win32-py2.6.exe
ÏÂÔصØÖ·£ºhttp://home.netimperia.com/files/misc/MySQL-python-1.2.2.win32-py2.6.exe
²Î¼û£ºhttp://sourceforge.net/forum/forum.php?thread_id=2316047&forum_id=70460
³£¼ûÎÊÌ⣺
1.ImportError: DLL load failed: ÕÒ²»µ½Ö¸¶¨µÄÄ£¿é¡£
—————————————————————————————————-
D:\Program Files\Python2.6>python
Python 2.6.1 (r261:67517, Dec  4 2008, 16:51:00) [MSC v.1500 32 bit (Intel)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import MySQLdb
Traceback (most recent call last):
  File “<stdin>”, line 1, in <module>
  File “D:\Program Files\Python2.6\Lib\site-packages\MySQLdb\__init__.py”, line 19, in <module>
    import _mysql
ImportError: DLL load failed: ÕÒ²»µ½Ö¸¶¨µÄÄ£¿é¡£
—————————————————————————————————-
½â¾ö·½·¨£ºÏÂÔØlibmmd.dll(¸½¼þ)ºÍlibguide40.dll(¸½¼þ)Á½¸ödllÎļþ²¢¸´ÖƵ½python°²×°Ä¿Â¼µÄLib\site-packagesÏ¡£
²Î¼û£ºhttp://sourceforge.net/forum/message.php?msg_id=5613887
2.ImportError: DLL load failed: ÕÒ²»µ½Ö¸¶¨µÄÄ£¿é¡£
————————————————————————————————&m


Ïà¹ØÎĵµ£º

ÈçºÎÐÞ¸ÄMYSQLµÄ×Ö·û±àÂë


²é¿´×Ö·û¼¯ÉèÖÃ
mysql> show variables like 'collation_%';
+----------------------+-----------------+
| Variable_name         | Value            |
+----------------------+-----------------+
| collation_connection | utf8_ge ......

MySQLÐÔÄÜÓÅ»¯


MySQLÐÔÄÜÓÅ»¯µÄ×î¼Ñ20+Ìõ¾­Ñé
½ñÌ죬Êý¾Ý¿âµÄ²Ù×÷Ô½À´Ô½³ÉΪÕû¸öÓ¦ÓõÄÐÔÄÜÆ¿¾±ÁË£¬Õâµã¶ÔÓÚWebÓ¦ÓÃÓÈÆäÃ÷ÏÔ¡£¹ØÓÚÊý¾Ý¿âµÄÐÔÄÜ£¬Õâ²¢²»Ö»ÊÇDBA²ÅÐèÒªµ£ÐĵÄÊ£¬¶øÕâ¸üÊÇÎÒÃdzÌÐòÔ±ÐèҪȥ¹Ø×¢µÄÊÂÇé¡£µ±ÎÒÃÇÈ¥Éè¼ÆÊý¾Ý¿â±í½á¹¹£¬¶Ô²Ù×÷Êý¾Ý¿âʱ£¨ÓÈÆäÊDzé±íʱµÄSQLÓï¾ä£©£¬ÎÒÃǶ¼ÐèҪעÒâÊý¾Ý²Ù×÷µÄÐÔÄÜ¡£ÕâÀÎÒÃDz»» ......

MsSQL,MySQL,Oracle,Êý¾Ý¿âÁ¬½Ó×Ö¶Î

Ms sql 2000
drivername=com.microsoft.jdbc.sqlserver.SQLServerDriver
url=jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=books
username=sa
password=sa
MySQL
drivername=com.mysql.jdbc.Driver
url=jdbc:mysql://localhost/books
username=root
password=root
Oracle
drivername=orac ......

MySQL¿Í»§¶ËÃüÁîÐÐÓ¦Óü¼ÇÉ

1.ʵÏÖTAB¼ü²¹È«
SHELL>vi /etc/my.cnf
[mysql]
#no-auto-rehash
auto-rehash
SHELL>reboot mysqld
note: 1.ÒªÏÈuseµ½Ä³¸öÊý¾Ý¿âÏ£»2.Òª²¹È«µÄ¹Ø¼ü×ÖÐèÒª´óд¡£
2.promptÈòÙ×÷¸ü¼ÓÇå³þ
mysql>prompt \u@\h(\d) \r:\m:\s    (ÁÙʱ)
[mysql]   £¨³¤¾Ã£©
prompt=\\u@\\h
3.pagerÈÃä ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ