「無法通過socket連接到本地MySQL服務器」當我調用該文件mysql_secure_installation我收到錯誤,如mysql_secure_installation
[[email protected] 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文件中指定的文件的襪子是/ home/mysqk123 /tmp/mysql.sock和我正在使用rehhat linux 5.3和mysql 5.1.47
我知道mysql_secure_installation腳本執行的任務可以手動執行,但是在這裏我必須運行腳本[不允許執行任務手動]
任何暗示s到解決問題是我
由於其工作 – vidyadhar 2013-03-16 21:37:42
你是天才:) – 2013-09-24 01:49:34
在MySQL 5.7.2中,'mysql_secure_installation.sh'將由二進制替換了接受命令行上的選項,特別是['--socket = path'](http://dev.mysql.com/doc/refman/5.7/en/mysql-secure-installation.html)。我還沒有測試過,但我會在更多地瞭解它時更新答案。 – RandomSeed 2014-11-14 11:27:03