ÈÃmysql Äܹ»Ô¶³ÌÁ¬½Ó
mysql error number 2003
Can't connect to MySQL server xxx.xxx.xxx.xxx (10061)
ÔÚubuntu 9.04ÖÐĬÈÏ°²×°ÁËmysql£¬Ä¬ÈÏÖ»Äܱ¾µØ·ÃÎÊ£¬googleÁËһϣº
²ÉÓÃ
µÇ¼µ½MySQL·þÎñÆ÷¶Ë£¬ÔÚmysql¿âÏÂÖ´ÐÐ
grant all on *.* to 'remote'@'172.16.21.39' identified by 'password';
¼´¿É
Èç¹ûÒªÉèÖÃΪÈκοͻ§¶Ë¶¼¿ÉÒÔÒÔrootÁ¬½ÓµÄ»°£¬¿ÉÒÔÕâôд£º
grant all on *.* to 'root'@'%' identifiied by 'rootµÄÃÜÂë'
¸ñʽ£ºgrant select on Êý¾Ý¿â.* to Óû§Ãû@µÇ¼Ö÷»ú identified by "ÃÜÂë"
ÀàËÆÕâÓ÷½·¨µÄÕûÀíÈçÏ£º
1¡£ ¸Ä±í·¨¡£¿ÉÄÜÊÇÄãµÄÕʺŲ»ÔÊÐí´ÓÔ¶³ÌµÇ½£¬Ö»ÄÜÔÚlocalhost¡£Õâ¸öʱºòÖ»ÒªÔÚlocalhostµÄÄÇ̨µçÄÔ£¬µÇÈëmysqlºó£¬¸ü¸Ä "mysql" Êý¾Ý¿âÀïµÄ "user" ±íÀïµÄ "host" Ï´Ó"localhost"¸Ä³Æ"%"
mysql -u root -pvmwaremysql>use mysql;mysql>update user set host = '%' where user = 'root';mysql>select host, user from user;
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;
µ«ÎÊÌâÈÔûÓнâ¾ö£º
ÕÒµ½ ÃüÁî mysql> flush privileges //ʹÐÞ¸ÄÉúЧ
ÏÔʾӰÏìÁËÁãÐС£
ÎÊÌâÒÀȻûÓнâ¾ö£¬ÖØÐÂÆô¶¯mysql sudo /etc/init.d/mysql restart
»¹ÊDz»ÐС£
´Ó http://www.blogjava.net/waterjava/archive/2008/04/27/196385.html
Á˽⵽mysqlÓб¾»ú°ó¶¨£¬ÕÒµ½ÎÊÌâËùÔÚ¡£
±à¼ /etc/mysql/my.cnf
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
½«”bind-address = 127.0.0.1“×¢ÊÍ
sudo /etc/init.d/mysql restartÖØÆô¼´¿ÉÔ¶³Ì·ÃÎÊ
ÎÊÌâ½â¾ö
±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£ºhttp://blog.csdn.net/helen_shw/archive/2010/01/22/5224524.aspx
Ïà¹ØÎĵµ£º
mysql ´´½¨ Êý¾Ý¿âʱָ¶¨±àÂëºÜÖØÒª£¬ºÜ¶à¿ª·¢Õ߶¼Ê¹ÓÃÁËĬÈϱàÂ룬µ«ÊÇÎÒʹÓõľÑéÀ´¿´£¬Öƶ¨Êý¾Ý¿âµÄ±àÂë¿ÉÒԺܴó³Ì¶ÈÉϱÜÃâµ¹Èëµ¼³ö´øÀ´µÄÂÒÂëÎÊÌâ¡£
ÎÒÃÇ×ñѵıê×¼ÊÇ£¬Êý¾Ý¿â£¬±í£¬×ֶκÍÒ³Ãæ»òÎı¾µÄ±àÂëҪͳһÆðÀ´
ºÜ¶àmysqlÊý¾Ý¿â¹¤¾ß£¨³ýÁËphpmyadmin£¬ÎÒż¶ûÓ㬹¦ÄÜÇ¿ËÙ¶ÈÂý£©¶¼²»Ö§³Ö´´½¨Ê±Ö¸¶¨Êý¾Ý¿â±àÂ룬 ......
ÔÚmenzhi007µÄblogÀï¿´µ½·Ç³£ÓÐÒâ˼µÄ¶«Î÷£ºhttp://hi.baidu.com/menzhi007/blog/item/c2e98551a18754848c54301c.html
ÔÚmysqlÊÖ²áÀ
http://www.phpchina.com/manual/mysql/functions.html#comparison-operators
MySQL°´ÕÕÒÔϹæÔò½øÐÐÊýÖµ±È½Ï£º
ÈôÓÐÒ»¸ö»òÁ½¸ö²ÎÊýΪ NULL£¬³ý·ÇNULL-safe <=> µÈËã·û£¬Ôò±È ......
±¾ÎĽéÉÜÁËÊý¾Ý¿âË÷Òý£¬¼°ÆäÓÅ¡¢È±µã¡£Õë¶ÔMySQLË÷ÒýµÄÌص㡢ӦÓýøÐÐÁËÏêϸµÄÃèÊö¡£·ÖÎöÁËÈçºÎ±ÜÃâMySQLÎÞ·¨Ê¹Óã¬ÈçºÎʹÓÃEXPLAIN·ÖÎö²éѯÓï¾ä£¬ÈçºÎÓÅ»¯MySQLË÷ÒýµÄÓ¦Óᣱ¾ÎÄÕª×Ô¡¶MySQL 5ȨÍþÖ¸ÄÏ¡·(3rd)µÄ8.9½Ú¡£(2007.07.05×îºó¸üÐÂ)
Ë÷ÒýÊÇÒ»ÖÖÌØÊâµÄÎļþ(InnoDBÊý¾Ý±íÉϵÄË÷ÒýÊDZí¿Õ¼äµÄÒ»¸ö× ......
³£ÓÃmysqlÃüÁîÐÐÃüÁî
¡¡¡¡1 .mysqlµÄÆô¶¯ÓëÍ£Ö¹
¡¡¡¡Æô¶¯MYSQL·þÎñ net start mysql
¡¡¡¡Í£Ö¹MYSQL·þÎñ net stop mysql
¡¡¡¡2 . netstat –na | findstr 3306 ²é¿´±»¼àÌýµÄ¶Ë¿Ú , findstrÓÃÓÚ²éÕÒºóÃæµÄ¶Ë¿ÚÊÇ·ñ´æÔÚ
¡¡¡¡3 . ÔÚÃüÁîÐÐÖеǽMYSQL¿ØÖÆ̨ , ¼´Ê¹Óà MYSQL COMMEND LINE TOOL
¡¡¡¡ Óï·¨¸ñʽ ......