首页 > 解决方案 > 无法在 Linux 中启动 MySQL

问题描述

已经通过 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

为什么会这样以及如何解决这个..?

标签: mysqlubuntu

解决方案


为了安全起见,不建议以 root 身份运行“mysqld”。但是您可以使用 '--user=root' 选项来做到这一点。详情请参阅。 https://dev.mysql.com/doc/refman/8.0/en/security-against-attack.html


推荐阅读