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

mysqlĬÈÏÊÇÖ»ÄÜ´Ólocalhost·ÃÎÊ

 ËùÒÔ³ýÁ˸øÕË»§È¨ÏÞÒÔÍâ »¹ÓÐÐÞ¸Ä /etc/mysql/my.cnf
ÕÒµ½ bind-address = 127.0.0.1 ÐÞ¸ÄΪ bind-address = 0.0.0.0
ÖØÆômysql : sudo /etc/init.d/mysql restart
·ñÔò»á±¨ ERROR 2003 (HY000): Can't connect to MySQL server on 'x.x.x.x' (111)
ºÃ°É ÎÒÊÇmysql²ËÄñ ÒÔÇ°¶¼ÊÇ×ßlocalhostµÄ


Ïà¹ØÎĵµ£º

*nix»·¾³ÏÂÔ´Âë±àÒë°²×°mysql

 ÎªÊ²Ã´Ñ¡ÔñÔ´Âë±àÒë°²×°mysql£ºÎÒÔÚʹÓÃrpm»òÕßÊÇyum°²×°Ê±myql£¬ÀÏÊÇÌáʾÎÒÕÒ²»µ½*.sockÎļþ£¬ÕÒÁ˵ã
×ÊÁÏ˵ÊǸðüÊǷǹٷ½°æ±¾£¨Ã÷Ã÷Êǹٷ½ÏÂÔØ µÄ£©£¬ÆäÖÐÔ­Òòµ½ÏÖÔÚ»¹Ã»ÓиãÇå³þ¡£Ï£ÍûÖªÇéÈËÊ¿¸æÖª¡££¨¿ªÊ¼±àÒëµÄʱºò£¬ÏµÍ³»·¾³Ò»¶¨ÒªÅäÖúã¬GCC£¬GC++...µÈµÈµÄ±àÒëÆ÷Ò»¶¨Òª×öºÃ,±¾È˵ÄcentosÓÉÓÚ¿ªÊ¼
ϵͳ»·¾ ......

asp Á¬½Ó mysql ´úÂë

 Á¬½Ó´úÂë1Ö±½ÓÊäÈë
<%
Dim my_conn, sql,rs
Set my_conn = createobject("ADODB.Connection")
my_conn.open = "DRIVER={MySQL ODBC 3.51 Driver};"_
& "SERVER=localhost;"_ '·þÎñÆ÷Ãû
& "DATABASE=mybase;"_ 'Êý¾Ý¿âÃû
& "UID=root;PWD=111; OPTION=35;" 'Óû§ÃûºÍÃÜÂë
Set rs = Server.Crea ......

.\mysql\user is marked as crashed ½â¾ö°ì·¨

 
I found a solution to anyone else who may be having this problem.
First start mysql using skip grant tables
root@ns1 [/var/lib/mysql/mysql]# service mysql start --skip-grant-tables
Starting MySQL [ OK ]
now with mysql started, you can repair the mysql/user table
root@ns1 [/var/lib/mysql ......

mysqliÓëmysqlÇø±ð

 mysqlÊǷdzּÌÁ¬½Óº¯Êý¶ømysqliÊÇÓÀÔ¶Á¬½Óº¯Êý¡£Ò²¾ÍÊÇ˵
mysqlÿ´ÎÁ´½Ó¶¼»á´ò¿ªÒ»¸öÁ¬½ÓµÄ½ø³Ì¶ømysqli¶à´ÎÔËÐÐmysqli½«Ê¹ÓÃͬһÁ¬½Ó½ø³Ì,´Ó¶ø¼õÉÙÁË·þÎñÆ÷µÄ¿ªÏú
ÓÐЩÅóÓÑÔÚ±à³ÌµÄʱºò£¬Ê¹ÓÃnew mysqli('localhost', usenamer', 'password', 'databasename');×ÜÊDZ¨´í£¬Fatal error: Class 'mysqli' not found in ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ