MySQL Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root
MySQL About 351 words说明
MySQL不建议以root用户启动。
解决
方法一
root用户下启动时指定用户为mysql。
mysqld --user=mysql --daemonize
方法二
因为mysql用户是nologin属性,所以启动时指定使用mysql用户。
sudo -u mysql /usr/sbin/mysqld --daemonize --pid-file=/home/mysql/mysqld.pid
方法三
my.cnf的mysqld节点下添加user=mysql。
[mysqld]
user=mysql
配置文件添加指定用户后,即可执行如下命令。
mysqld --daemonize
方法四(不建议)
启动时指定用户为root。
mysqld --user=root --daemonize
Views: 8,199 · Posted: 2021-03-13
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb/LiteNote扫描下方二维码关注公众号和小程序↓↓↓
Loading...