无法在Linux中启动MySQL

时间:2018-11-10 04:40:26

标签: mysql ubuntu

已经通过APT存储库下载了MySQL存储库,然后已经进行了sudo apt-get updatesudo apt-get install mysql-server。但我收到以下错误:

asus@asus-K40IJ:~$ sudo mysqld
[sudo] password for asus: 
2018-11-10T04:34:58.070075Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-11-10T04:34:58.074324Z 0 [Note] mysqld (mysqld 5.7.24) starting as process 3686 ...
2018-11-10T04:34:58.077869Z 0 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

2018-11-10T04:34:58.077928Z 0 [ERROR] Aborting

2018-11-10T04:34:58.077959Z 0 [Note] Binlog end
2018-11-10T04:34:58.078047Z 0 [Note] mysqld: Shutdown complete

这是为什么以及如何解决..?

1 个答案:

答案 0 :(得分:0)

为了安全起见,不建议以root用户身份运行'mysqld'。但是您可以使用'--user = root'选项来实现。 请参阅以获取更多详细信息。 https://dev.mysql.com/doc/refman/8.0/en/security-against-attack.html