參考資料: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