我调用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):
但是在我的.cnf文件中给出的sock文件是/home/mysqk123/tmp/mysql.sock,我正在使用redhat linux 5.3和mysql 5.1.47。
我知道mysql_secure_installation脚本执行的任务可以手动执行,但是这里我必须运行脚本[不允许手动执行任务]。
mysql_secure_installation.sh
将被一个二进制文件所取代,该文件可以在命令行上接受选项,特别是--socket=path
。我还没有测试过它,但当我了解更多时,我会更新答案。 - RandomSeedmy.cnf
文件。而且我没有在脚本本身中找到那个套接字路径。怎么回事? - will