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

mysqlÓû§ÈÏ֤ЭÒé¸ü»»£¨mysqlʹÓÃÎÊÌâ)

°²×°ºÃmysqlºó£¬ÔÚʹÓÃmysqʱ£¬³öÏÖÁËÈçÏÂÎÊÌâ.
java.sql.SQLException: Communication failure during handshake. Is there a server running on localhost:3306?
at org.gjt.mm.mysql.MysqlIO.init(MysqlIO.java:327)
at org.gjt.mm.mysql.Connection.connectionInit(Connection.java:261)
at org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Connection.java:89)
at org.gjt.mm.mysql.Driver.connect(Driver.java:167)
at java.sql.DriverManager.getConnection(DriverManager.java:523)
MYSQL 4.1ÒÔºó, ²ÉÓÃÁËÒ»ÖÖеÄÓû§ÈÏ֤ЭÒé, ¶ÔÓÚÀϵĿͻ§¶Ë»á³öÏÖ²»Ö§³ÖÈÏ֤ЭÒéµÄ´íÎó, ÒÔÏÂÊǹٷ½ÍøÕ¾µÄ½â¾ö·½·¨﹔
1When connecting to the server with a pre-4.1 client program, use an account that still has a pre-4.1-style password.
ʹÓÃÒÔǰ½¨Á¢µÄÕ˺ÅÁ¬½Ó£¬¶ÔÓÚÔÚеÄÈÏ֤ЭÒéϽ¨Á¢µÄÕË»§¾Í²»ÐÐÁË
£³Reset the password to pre-4.1 style for each user that needs to use a pre-4.1 client program. This can be done using the SET PASSWORD statement and the OLD_PASSWORD() function: mysql> SET PASSWORD FOR 
-> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');
Alternatively, use UPDATE and FLUSH PRIVILEGES: mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd') -> WHERE Host = 'some_host' AND User = 'some_user'; 
mysql> FLUSH PRIVILEGES;
Substitute the password you want to use for ``newpwd'' in the preceding examples. MySQL cannot tell you what the original password was, so you'll need to pick a new one.
ÕâÊÇÒ»¸ö²»´íµÄ°ì·¨£¬Ð½¨Á¢µÄÕ˺ŲÉÓÃÀÏʽµÄ¼ÓÃÜЭÒé
£´Tell the server to use the older password hashing algorithm: 
Start mysqld with the --old-passwords option.
ÕâÑùÐÂÈÏ֤ЭÒéµÄÓŵã¾Íû·¨Ê¹ÓÃÁË
£µAssign an old-format password to each account that has had its password updated to the longer 4.1 format. You can identify these accounts with the following query: mysql> SELECT Host, User, Password from mysql.user 
-> WHERE LENGTH(Password) > 16;
For each account record displayed by the query, use the Host and User values and assign a password using th


Ïà¹ØÎĵµ£º

mysql cache¹¦ÄÜС¼Ç

http://www.cnblogs.com/rethink/archive/2009/10/09/1579634.html
mysql cache¹¦ÄÜ·ÖÎö£º
1
mysqlµÄcache¹¦ÄܵÄkeyµÄÉú³ÉÔ­ÀíÊÇ£º°ÑselectÓï¾ä°´ÕÕÒ»¶¨µÄhash¹æÔòÉú³ÉΨһµÄkey£¬selectµÄ½á¹ûÉú³Évalue£¬¼´key=>value¡£ËùÒÔ¶ÔÓÚcache¶øÑÔ£¬selectÓï¾äÊÇÇø·Ö´óСдµÄ£¬Ò²Çø·Ö¿Õ¸ñµÄ¡£Á½¸öselectÓï¾ä±ØÐëÍêÍêȫȫһÖ ......

MySQLѧϰ±Ê¼Ç£ºInnoDBºÍMyISAMµÄ²î±ð


InnoDB
ºÍMyISAM
ÊÇÔÚʹÓÃMySQL
×î³£ÓõÄÁ½¸ö±íÀàÐÍ£¬¸÷ÓÐÓÅȱµã£¬ÊÓ¾ßÌåÓ¦Óöø¶¨¡£»ù±¾µÄ²î±ðΪ£ºMyISAM
ÀàÐͲ»Ö§³ÖÊÂÎñ´¦ÀíµÈ¸ß¼¶´¦Àí£¬¶øInnoDB
ÀàÐÍÖ§³Ö¡£MyISAM
ÀàÐ͵ıíÇ¿µ÷µÄÊÇÐÔÄÜ£¬ÆäÖ´ÐÐÊý¶È±ÈInnoDB
ÀàÐ͸ü¿ì£¬µ«ÊDz»ÌṩÊÂÎñÖ§³Ö£¬¶øInnoDB
ÌṩÊÂÎñÖ§³ÖÒѾ­Íⲿ¼üµÈ¸ß¼¶Êý¾Ý¿â¹¦ÄÜ¡£
MyIASMÊÇIASM± ......

MySQL±í±ÀÀ£

Èç¹ûÔÚһЩ¸üÐÂÃüÁîÖ®ºó£¬mysqld×ÜÊǵ±µô£¬»òÕßÈç¹ûÄãÓöµ½±»ÆÆ»µµÄ±í£¬Äã¿ÉÒÔÓÃÏÂÃæµÄ²Ù×÷²âÊÔ¿´Õâ¸öȱÏÝÊÇ·ñÊÇ¿ÉÖØ¸´²úÉúµÄ£º
жµôMySQLÊØ»¤½ø³Ì£¨ÓÃmysqladmin shutdown£©¡£
¸ø¸Ã±í×ö±¸·Ý£¨·ÀÖ¹ÐÞ¸´²Ù×÷·´¶ø¸ã»µÕâÖֺܲ»¿ÉÄܳöÏÖµÄÇé¿ö£©¡£
Óà myisamchk -s database/*.MYI ¼ì²éËùÓÐµÄ±í£¬ÓÃmyisamchk -r database/ ......

mysqlÖÐIN×Ó²éѯÅÅÐò

Õ⼸Ìì×öÒ»¸ö²éѯ£¬ÐèÒªÔÚÒ»¸öÖ¸¶¨µÄ½á¹û¼¯ÖнøÐвéѯ£¬ÀýÈ磺
select * from table_name where doc_id IN ('1dba', 'c20a', '907b')
ÆäÖÐIN×Ó¾äÖеÄdoc_idÁбíÊÇͨ¹ýµ÷ÓÃÒ»¸öÍⲿ½Ó¿Ú»ñµÃÒ»×édoc_id³£Á¿ÁÐ±í£¬È»ºóÔÚ±¾µØ¿âÖÐËÑË÷·ûºÏÕâ¸öÁбíµÄÊý¾Ý
¼Ç¼¡£ºóÀ´·¢ÏÖmysql·µ»ØµÄ½á¹û¼¯µÄÅÅÐòÊǰ´ÕÕÈë¿â˳Ðò¸ø³öµÄ£¬µ«ÊÇÎÒ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ