How to add option correctly in `sudo /usr/local/mysql/bin/mysqld --defaults-file="/etc/my.cnf" start`

161 Views Asked by At

To avoid [ERROR] Can't read from messagefile '/usr/share/mysql/errmsg.sys' I need [ERROR] Can't read from messagefile '/usr/share/mysql/errmsg.sys'. But sudo /usr/local/mysql/bin/mysqld --defaults-file="/etc/my.cnf" gives me [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!. And I learned that I need sudo /usr/local/mysql/bin/mysqld start to start the service. But sudo /usr/local/mysql/bin/mysqld --defaults-file="/etc/my.cnf" start gives me same error as sudo /usr/local/mysql/bin/mysqld --defaults-file="/etc/my.cnf" and sudo /usr/local/mysql/bin/mysqld start --defaults-file="/etc/my.cnf" is same as sudo /usr/local/mysql/bin/mysqld start... So I don't know what to do...

PS: In sudo /usr/local/mysql/bin/mysqld --verbose --help, it mentioned that --defaults-file=# Only read default options from the given file #.

0

There are 0 best solutions below