【发布时间】:2013-03-04 13:47:54
【问题描述】:
当我调用文件 mysql_secure_installation 时,我收到类似的错误
[mysqk123@InstallZeMo bin]$ ./mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MySQL to secure it, we'll need the current
password for the root user. If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Enter current password for root (enter for none):
但 my.cnf 文件中给定的 sock 文件是 /home/mysqk123/tmp/mysql.sock,我使用的是 redhat linux 5.3 和 mysql 5.1.47
我知道mysql_secure_installation脚本执行的任务可以手动执行,但是这里我必须运行脚本[不允许手动执行任务]
【问题讨论】:
标签: mysql database-administration mysql-error-2002