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
就可以了
MySQL报错'Can't connect to local MySQL server through socket '