22. Linux MySQL 启动遇到问题([ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!)


参考资料:https://www.cnblogs.com/abclife/p/5052997.html

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

测试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

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM