[תÔØ]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 wh
Ïà¹ØÎĵµ£º
1. MySQLÊÇÒ»¸öСÐ͹ØϵÐÍÊý¾Ý¿â¹ÜÀíϵͳ
2. MySQLµÄÊý¾ÝÀàÐÍ£º
ÕûÊýÐÍ£ºTINYINT£¬SMALLINT£¬INT£¬BIGINT
СÊýÐÍ£ºFLOAT£¬DOUBLE£¬DECIMAL(M,D)
×Ö·ûÐÍ£ºCHAR£¬VARCHAR
ÈÕÆÚÐÍ£ºDATETIME £¬DATE£¬TIMESTAMP
±¸×¢ÐÍ£ºTINYTEXT £¬TEXT £¬LONGTEXT
£¨°´php100µÄ½Ì³ÌÀï·ÖµÄ£©
3.MySQLµÄ»ù±¾Óï¾ä
´´½¨Êý¾Ý¿â C ......
MySQLÊÇÒ»¸öÕæÕýµÄ¶àÓû§¡¢¶àÏß³ÌSQLÊý¾Ý¿â·þÎñÆ÷¡£MySQLÊÇÒÔÒ»¸ö¿Í»§»ú/·þÎñÆ÷½á¹¹µÄʵÏÖ£¬ËüÓÉÒ»
¸ö·þÎñÆ÷ÊØ»¤³ÌÐòmysqldºÍºÜ¶à²»Í¬µÄ¿Í»§³ÌÐòºÍ¿â×é³É¡£ÓÉÓÚÆäÔ´ÂëµÄ¿ª·ÅÐÔ¼°Îȶ¨ÐÔ£¬ÇÒÓëÍøÕ¾Á÷Ðбà徎ÓïÑÔPHPµÄÍêÃÀ½áºÏ£¬ÏÖÔںܶàÕ¾µã¶¼ÀûÓÃÆä
µ±×÷ºó¶ËÊý¾Ý¿â£¬Ê¹Æä»ñµÃÁ˹㷺ӦÓᣴ¦ÓÚ°²È«·½ÃæµÄ¿¼ÂÇ£¬ÐèҪΪà ......
mysqlµÄ´æ´¢ÒýÇæÓм¸ÖÖ£¬µ«ÊÇ´Ó5.0¿ªÊ±´ó²¿·ÖÊÇĬÈϲÉÓà innodb´æ´¢ÒýÇæ¡£innodb´æ´¢ÒýÇæÖ§³Ö ÊÂÎñ£¬Íâ¼ü£¬ÐÐÊý¾ÝËø¶¨£¨µ±È»ÊÇÏà¶ÔmyisamµÄ±íËø¶¨£©¡£magento°²×°µÄʱºòÓмì²é mysqlÊÇ·ñÖ§³Öinnodb´æ´¢ÒýÇ棬Èç¹û²»Ö§³ÖÔò²»ÄܼÌÐø°²×°¶øÌáʾÈçÏ´íÎ󣬾¡¹Üinnodb´æ´¢²¢Ã»Óб»ÁÐΪ°²×°magentoµÄÇ°ÌáÌõ¼þÖ®Ò»¡£
Database&nbs ......
1 ÉèÖÃphpMyAdmin
Language£ºChinese simplified (zh-utf-8)
MySQL ×Ö·û¼¯£ºUTF-8 Unicode (utf8)
MySQL Á¬½ÓУ¶Ô£ºgbk_chinese_ci
2 ´´½¨Êý¾Ý¿âʱ
ÕûÀíÉèÖÃ³É gbk_chinese_ci
3 ÓÃSQL½¨Á¢±íÖÐ
ENGINE=MyISAM DEFAULT CHARSET=gbk;
ENGINE=InnoDB DEFAULT CHARSET=gbk ......
MysqlĬÈϵıàÂëÊÇlatin1£¬ËùÒÔͨ¹ýSqlyog»òÕßJava³ÌÐò¶ÁдÊý¾Ý¿âʱ£¬ÖÐÎĶ¼½«ÏÔʾΪÂÒÂ룬µ«ÔÚ¿ØÖÆ̨ͨ¹ýÃüÁîÐпÉÒÔÏÔʾÖÐÎÄ¡£
ÈçºÎ½â¾öÖÐÎÄÂÒÂëÎÊÌâÄØ£¬¸Ä±äMysqlϵͳµÄ±àÂ뷽ʽ£¬ÔÚMySqlĿ¼ÏµÄmy.iniÎļþÖеÄdefault-character-set=latin1¸ÄΪdefault-character-set=gbk(»òÆäËû),ÔÙÖØÆô·þÎñ¡£µ«ÈÔÈ»ÏÔʾΪÂÒÂ룬ÔÀ ......