°²×°mysql·þÎñÆ÷£¬¼°ÐÞ¸Ä1130´íÎó
°²×°·þÎñÆ÷¶Ë£ºÏÂÔØÒ»¸ömysqlµÄ°²×°³ÌÐò£¬ÎÒ°²×°µÄÊÇ5.0°æ±¾µÄ£¬°´ÕÕÌáʾһ²½²½²Ù×÷Íê³É¡£Ã»ÓÐʲôÌرð˵Ã÷µÄ¡£
°²×°¿Í»§¶Ë£ºÏÂÔØÒ»¸ömysql-query-browser£¬ÎÒÓõÄÊÇ1.1°æ±¾µÄ£¬°²×°£¬°´ÕÕÌáʾ²Ù×÷¡£
¶¼°²×°Íê³ÉÒÔºó£¬ÔÚ±¾»úÓÃbrowser²âÊÔÒ»ÏÂÊÇ·ñÄÜÁ¬µÄÉϱ¾»úµÄ·þÎñ£¬Á¬½Ó³É¹¦£¬¶¼°²×°OK.
Èç¹ûÄãÏëÈÃÆäËûµÄ¿ª·¢ÈËÔ±Ò»ÆðÁ¬µ½serverÉÏ¿ª·¢£¬Äã»á·¢ÏÖÆäËû»úÆ÷ÔÚÁ¬½Ó·þÎñÆ÷ʱ»á±¨
ERROR 1130: Host '192.168.1.3' is not allowed to connect to this MySQL server£¬ÕâÊÇÒòΪmysql°²×°Íê³ÉÒÔºóĬÈϾÍÖ»ÈÃlocalhost·ÃÎÊ£¬ËùÒÔÐèÒªÐÞ¸ÄÒ»ÏÂÊôÐÔ¡£
½â¾ö·½·¨£º
1¡£ ¸Ä±í·¨¡£¿ÉÄÜÊÇÄãµÄÕʺŲ»ÔÊÐí´ÓÔ¶³ÌµÇ½£¬Ö»ÄÜÔÚlocalhost¡£Õâ¸öʱºòÖ»ÒªÔÚlocalhostµÄÄÇ̨µçÄÔ£¬µÇÈëmysqlºó£¬¸ü¸Ä "mysql" Êý¾Ý¿âÀïµÄ "user" ±íÀïµÄ "host" Ï´Ó"localhost"¸Ä³Æ"%"
update user set host = '%' where user = 'root'
2. ÊÚȨ·¨¡£ÀýÈ磬ÄãÏëmyuserʹÓÃmypassword´ÓÈκÎÖ÷»úÁ¬½Óµ½mysql·þÎñÆ÷µÄ»°¡£
GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
Èç¹ûÄãÏëÔÊÐíÓû§myuser´ÓipΪ192.168.1.3µÄÖ÷»úÁ¬½Óµ½mysql·þÎñÆ÷£¬²¢Ê¹ÓÃmypassword×÷ΪÃÜÂë
GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'192.168.1.3' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
²Ù×÷Ö®ºó¼ÇµÃÖØÆôһϷþÎñ£¬ÔÙ²âÊÔÒ»ÏÂÓ¦¸Ã£¬ÎÒÓõÄÊǵÚÒ»ÖÖ·½·¨£¬okµÄ¡£
Ïà¹ØÎĵµ£º
ʹÓÃant¹¤¾ß±àÒë³ÌÐò£¬ÔËÐгÌÐò.ÃüÁî:ant -f xxx.xmlÖ¸¶¨Éú³ÉÎļþ£»ant run±àÒë²¢ÔËÐÐÎļþ¡£
Èç¹ûHibernate½«ÖÐÎIJåÈëmysqlÊý¾Ý¿â£¬µ÷ÓÃselectÓï¾äÖÐÎÄÏÔʾÂÒÂ룬ÔòmysqlµÄ±àÂ뷽ʽÉèΪgbk£¬×¢ÒâÕâÀïÊÇСд£¬²»ÓÃÖØа²×°mysqlÊý¾Ý¿â£¬½«MySQL Server 5.1Ŀ¼ÏµÄmy.iniÅäÖÃÎļþÀïµÄËùÓÐdefault-character-setÉèΪgbk£¬× ......
1¡¢Ê¹ÓÃË÷ÒýÀ´¸ü¿ìµØ±éÀú±í¡£
ȱʡÇé¿öϽ¨Á¢µÄË÷ÒýÊÇ·ÇȺ¼¯Ë÷Òý£¬µ«ÓÐʱËü²¢²»ÊÇ×î¼ÑµÄ¡£ÔÚ·ÇȺ¼¯Ë÷ÒýÏ£¬Êý¾ÝÔÚÎïÀíÉÏËæ»ú´æ·ÅÔÚÊý¾ÝÒ³ÉÏ¡£ºÏÀíµÄË÷ÒýÉè¼ÆÒª½¨Á¢ÔÚ¶Ô¸÷ÖÖ²éѯµÄ·ÖÎöºÍÔ¤²âÉÏ¡£Ò»°ãÀ´Ëµ£º
a.ÓдóÁ¿Öظ´Öµ¡¢ÇÒ¾³£Óз¶Î§²éѯ( > ,< £¬> =,< =)ºÍorder by¡¢group by·¢ÉúµÄÁУ¬¿É¿¼Âǽ¨Á¢Èº¼¯Ë÷ ......
ΪʲôÕâô˵ÄØ¡£ÒòΪ°¡ÎÒдÎÒ¹«Ë¾µÄ²éPVµÄÊý¾Ýʱ£¬·¢ÏÖ±íµÄ¹¦Äܲ»ÊǺÜÈ«£¬ÈÃÎÒÓÃÒ»¾ä»°Ð´³öÄÇôÀÏÅ£µÄSQLÓï¾äÕæµÄºÃÄÑ¡£
Õæô×Å°É£¬ÎÒд³öÎÒÕâ¾ä»°À´¿´Ò»¿´¡£
<?php
//########################2010-1-24 22£º48
//#######################Êý¾Ý¿â²éѯ
//######################±¾³ÌÐò¹²ÓÐ3¸ösql·Ö±ðΪsql,sql5,sql ......
1.ÆÕͨlog
¼Ç¼ËùÓÐsql²Ù×÷£¬°üÀ¨select£¬showÓï¾ä¡£
ÉèÖÃ
ĬÈÏÊDz»´ò¿ª´Ëlog¡£
´ò¿ªÊ±¿ÉÒÔÖ¸¶¨Ä¿Â¼£¬²»Ö¸¶¨Ê±±£´æÔÚÊý¾Ý¿â¼Ŀ¼Ï¡£
[mysqld]
log = /data/logs/mysql.log #´Ë·½Ê½ÎªÖ¸¶¨Îļþ
log = 1 ......
Á½ÖÖÀàÐÍ×îÖ÷ÒªµÄ²î±ð¾ÍÊÇInnodb Ö§³ÖÊÂÎñ´¦ÀíÓëÍâ¼üºÍÐм¶Ëø.¶øMyISAM²»Ö§³Ö.ËùÒÔMyISAMÍùÍù¾ÍÈÝÒ×±»ÈËÈÏΪֻÊʺÏÔÚСÏîÄ¿ÖÐʹÓá£
ÎÒ×÷ΪʹÓÃMySQLµÄÓû§½Ç¶È³ö·¢£¬InnodbºÍMyISAM¶¼ÊDZȽÏϲ»¶µÄ£¬µ«ÊÇ´ÓÎÒÄ¿Ç°ÔËάµÄÊý¾Ý¿âƽ̨Ҫ´ïµ½ÐèÇó£º99.9%µÄÎȶ¨ÐÔ£¬·½±ãµÄÀ©Õ¹ÐԺ͸߿ÉÓÃÐÔÀ´ËµµÄ»°£¬MyISAM¾ø¶ÔÊÇÎÒµÄÊ×Ñ¡¡£
ÔÒ ......