- 论坛徽章:
- 0
|
用客户端:
mysql -uroot
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 23 to server version:
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
可以正常连接
用php:
php -r "var_dump(mysql_connect('localhost','root',''));"
resource(4) of type (mysql link)
也可以正常连接
用perl:
perl -e "use DBI;DBI->connect('DBI:mysql:database:bds;host=localhost','root','');"
DBI connect('database:bds;host=localhost','root',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at -e line 1
请问各位大侠 是什么原因,并如何解决呢
[ 本帖最后由 lantxp 于 2007-12-27 11:58 编辑 ] |
|