在自己搭建的虚拟机上运行曾经安装的mysql,报如下信息:
[root@localhost mysql]# mysql -uroot -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
查找该文件也是没有找到
[root@localhost mysql]# find / -name mysql.sock
编辑/etc/my.cnf文件
重启服务:
[root@localhost tmp]# service mysql restart
ERROR! MySQL server PID file could not be found!
Starting MySQL...... SUCCESS!
报了一个PID找不到,又说启动成功,有点懵,连接下
[root@localhost tmp]# mysql -uroot -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using passwo