码迷,mamicode.com
首页 > 数据库 > 详细

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

时间:2015-12-17 10:33:02      阅读:189      评论:0      收藏:0      [点我收藏+]

标签:

测试mysqld启动mysql server的时候,报如下错误:

2015-12-17 00:46:02 10785 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

2015-12-17 00:46:02 10785 [ERROR] Aborting

2015-12-17 00:46:02 10785 [Note] Binlog end
2015-12-17 00:46:02 10785 [Note] ./mysqld: Shutdown complete

 

原因: 

这是因为在测试的时候,使用root来启动的。而从安全角度来讲,不建议用root用户启动。

 

解决方案:

1.在使用root用户启动的时候,带上--user=root,强制启动(不建议这么做,仅供测试)

# ./mysqld --user=root &
# ps -ef|grep mysql | grep -v grep
root     11055 11019  0 01:02 pts/0    00:00:00 ./mysqld --user=root

2.启动的时候,指定mysql用户

# ./mysqld --user=mysql &
# ps -ef|grep mysql |grep -v grep 
mysql    11165 11100  2 01:06 pts/1    00:00:00 ./mysqld --user=mysql

3.在my.cnf指定用户

[mysqld]
user=mysql

 

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

标签:

原文地址:http://www.cnblogs.com/abclife/p/5052997.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!