MySQL报错'Can't connect to local MySQL server through socket '
yum install mysql-server安装mysql后
mysql -uroot -p123456启动
出现错误:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock
进入/tmp/ 没有发现这个文件
mysql默认为空密码,难道密码不对?
设置密码mysqladmin -u root password '123456'
出现错误:mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)'
网上找了一下解决方法
chown -R mysql:mysql /var/lib/mysql
/etc/rc.d/init.d/mysqld start
就可以了
posted on 2012-01-29 15:46 tianhuilove 阅读(640) 评论(0) 编辑 收藏 举报