当前位置: 技术问答>linux和unix
centos6.3 无法连接 mysql
来源: 互联网 发布时间:2017-05-15
本文导语: [root@AY1403221420500563ebZ ~]# /etc/init.d/mysql start Starting MySQL. SUCCESS! [root@AY1403221420500563ebZ ~]# mysql -uroot mysql: unknown variable 'pid-file=/usr/local/mysql/data/mysql.pid' [root@AY1403221420500563ebZ ~]# cd /usr/local/mysql [root@AY1403221420500563ebZ mysql]#...
[root@AY1403221420500563ebZ ~]# /etc/init.d/mysql start
Starting MySQL. SUCCESS!
[root@AY1403221420500563ebZ ~]# mysql -uroot
mysql: unknown variable 'pid-file=/usr/local/mysql/data/mysql.pid'
[root@AY1403221420500563ebZ ~]# cd /usr/local/mysql
[root@AY1403221420500563ebZ mysql]# bin/mysql -h127.0.0.1
bin/mysql: unknown variable 'pid-file=/usr/local/mysql/data/mysql.pid'
[root@AY1403221420500563ebZ mysql]# mysql -uroot -p
mysql: unknown variable 'pid-file=/usr/local/mysql/data/mysql.pid'
[root@AY1403221420500563ebZ mysql]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/cmake-2.8.10.2/bin:/usr/local/mysql/bin:/usr/local/mysql/lib:/root/bin
[root@AY1403221420500563ebZ mysql]#
|
mysql客户端是去读了mysql的配置文件my.cnf
在my.cnf的[clien]部分有pid-file这个参数 删掉这一行试试
在my.cnf的[clien]部分有pid-file这个参数 删掉这一行试试