数据库连接语句只能这么写
$sql_obj=new sql_tools(".","sss","ssss","ssss","utf8");
写成$sql_obj=new sql_tools("localhost","sss","ssss","ssss","utf8");就报错Can't create TCP/IP socket
$sql_obj=new sql_tools(".","sss","ssss","ssss","utf8");
写成$sql_obj=new sql_tools("localhost","sss","ssss","ssss","utf8");就报错Can't create TCP/IP socket
D:\Program Files\MySQL\MySQL Server 5.0\bin>mysql -hlocalhost -uroot -p
Enter password: ******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7000
Server version: 5.0.83-community-nt MySQL Community Edition (GPL)Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
enable-named-pipe 这个开启之后只能 用"."
如果不开启就访问不了
D:\wangzhan\phpStudy\MySQL\bin>mysql -hlocalhost -usss -p
Enter password: ******
ERROR 1045 (28000): Access denied for user 'sss'@'localhost' (using password:YES)