要避免[ERROR] Can't read from messagefile '/usr/share/mysql/errmsg.sys'
我需要[ERROR] Can't read from messagefile '/usr/share/mysql/errmsg.sys'
。
但是sudo /usr/local/mysql/bin/mysqld --defaults-file="/etc/my.cnf"
给了我[ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
。
我了解到我需要sudo /usr/local/mysql/bin/mysqld start
来启动服务。但sudo /usr/local/mysql/bin/mysqld --defaults-file="/etc/my.cnf" start
给出了与sudo /usr/local/mysql/bin/mysqld --defaults-file="/etc/my.cnf"
相同的错误,sudo /usr/local/mysql/bin/mysqld start --defaults-file="/etc/my.cnf"
与sudo /usr/local/mysql/bin/mysqld start
相同...所以我不知道该怎么办......
PS:在sudo /usr/local/mysql/bin/mysqld --verbose --help
中,它提到--defaults-file=# Only read default options from the given file #.