error: Please read "Security" section of the manual to find out how to run mysqld as root! 报错

centos7.2 安装 mysqld 5.7.21

初始化是
[root@localhost ~]# mysqld --initialize--user=mmysql
2018-08-07T16:22:02.572082Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-08-07T16:22:02.573515Z 0 [Note] mysqld (mysqld 5.7.21) starting as process 5834 ...
2018-08-07T16:22:02.575125Z 0 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

2018-08-07T16:22:02.575159Z 0 [ERROR] Aborting

2018-08-07T16:22:02.575171Z 0 [Note] Binlog end
2018-08-07T16:22:02.575217Z 0 [Note] mysqld: Shutdown complete

 

删除rpm安装时生成的文件

datadir=/var/lib/mysql

解决方法

保证 --datadir目录为空。/var/lib/mysql 这个目录 

 

 

posted @ 2018-08-08 00:54  mac-mac  阅读(2504)  评论(0编辑  收藏  举报