本人菜鸟,这个错误该如何处理,谢谢.
基本信息:RedHat5.4 Kernel 2.6
mysql5.0
mysql_auth-0.8
[root@mail ~]# cd /home/mysql_auth-0.8
[root@mail mysql_auth-0.8]# cd scripts/
[root@mail scripts]# mysql -u root -p < create_script
Enter password:
[root@mail scripts]# mypasswd yang 123456
Can't connect to mysql server: localhost.
Error was: 2002 - Can't connect to local MySQL server through socket '/var/lib/mysql/mysqld.sock' (2). //错误
[root@mail scripts]# cd /var/lib/mysql/
[root@mail mysql]#ls -l
srwxrwxrwx 1 mysql mysql 0 04-29 17:04 mysql.sock
[root@mail mysql]# cd /home/mysql_auth-0.8
[root@mail mysql_auth-0.8]# mysql -u root -p < mysql_auth
Enter password:
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ELF
' at line 1 //错误
本人菜鸟,这个错误该如何处理,用户无法添加,谢谢.
为了节省网络资源,若有如下之类的回复,我先谢过!
比如:
先看服务是否正常启动
再看目录权限
最后查是否配置上的错误
1. 多看几个文档 看看配置过程你是否有步骤遗漏的
2. 你网上多搜搜 这2个 类似错误的帖子 看看他们如何解决的 !
can't connect to mysql server: localhost.
Can't connect to local MySQL server through socket '/var/lib/mysql/mysqld.sock' (2)
shaojiang614 于 2012-06-12 17:35:08发表:
可以换个加密认证方式,用htpasswd这个生成用户密码