Please read 'Security' section of the manual to find out how to run mysqld as root!

错误信息:
[ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

错误原因是mysql处于安全考虑,默认拒绝以root账号启动服务

解决方法有以下几种:

1、通过在命令后面加上--user=root进行强制使用root账号启动。

1
> mysqld --user=root

2、使用一个普通用户进行启动mysqld 。这个用户必须是属于mysqld用户组,
编辑/etc/my.cnf文件,在[mysqld]下新增启动用户mysql

1
2
[mysqld]
user=mysql

启动时加上--user=mysql

1
> mysqld --user=mysql