致命错误:请阅读手册中的“安全”部分,找出如何以root身份运行mysqld。

时间:2022-02-22 22:11:27

I am not sure how to fix this:

我不知道如何解决这个问题:

dyn-72-33-214-45:python mona$ sudo /usr/local/mysql/bin/mysqld stop
2014-09-06 09:49:04 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-09-06 09:49:04 22992 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql-5.6.15-osx10.7-x86_64/data/ is case insensitive
2014-09-06 09:49:04 22992 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

2014-09-06 09:49:04 22992 [ERROR] Aborting

2014-09-06 09:49:04 22992 [Note] Binlog end
2014-09-06 09:49:04 22992 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

6 个解决方案

#1


76  

I'm using OS X (Yosemite) and this error happened to me when I upgraded from Mavericks to Yosemite. It was solved by using this command

我正在使用OS X (Yosemite),当我从小牛升级到Yosemite的时候,这个错误发生在我身上。它是通过使用这个命令来解决的

sudo /usr/local/mysql/support-files/mysql.server start

#2


9  

The MySQL daemon should not be executed as the system user root which (normally) do not has any restrictions.

不应该将MySQL守护进程作为系统用户根执行,而系统用户根(通常)没有任何限制。

According to your cli, I suppose you wanted to execute the initscript instead:

根据您的cli,我认为您应该执行initscript:

sudo /etc/init.d/mysql stop

Another way would be to use the mysqladmin tool (note, root is the MySQL root user here, not the system root user):

另一种方法是使用mysqladmin工具(注意,root是这里的MySQL根用户,而不是系统根用户):

/usr/local/mysql/bin/mysqladmin --port=8889 -u root shutdown

#3


1  

Try this for Amazon Linux AMI or for centOS

在Amazon Linux AMI或centOS上试试这个

sudo service mysqld restart

#4


0  

osx could be using launchctl to launch mysql. Try this:

osx可以使用launchctl来启动mysql。试试这个:

sudo launchctl unload -w /Library/LaunchDaemons/com.mysql.mysqld.plist

#5


0  

Donal had the right solution for me. However, the updated plist name for 2017 is

Donal给我的解决办法是对的。然而,2017年更新的plist名称是

com.oracle.oss.mysql.mysqld.plist.

#6


0  

in my case (RHEL7 and MariaDB) this works.

在我的例子中(RHEL7和MariaDB),这起作用了。

sudo systemctl restart mariadb

#1


76  

I'm using OS X (Yosemite) and this error happened to me when I upgraded from Mavericks to Yosemite. It was solved by using this command

我正在使用OS X (Yosemite),当我从小牛升级到Yosemite的时候,这个错误发生在我身上。它是通过使用这个命令来解决的

sudo /usr/local/mysql/support-files/mysql.server start

#2


9  

The MySQL daemon should not be executed as the system user root which (normally) do not has any restrictions.

不应该将MySQL守护进程作为系统用户根执行,而系统用户根(通常)没有任何限制。

According to your cli, I suppose you wanted to execute the initscript instead:

根据您的cli,我认为您应该执行initscript:

sudo /etc/init.d/mysql stop

Another way would be to use the mysqladmin tool (note, root is the MySQL root user here, not the system root user):

另一种方法是使用mysqladmin工具(注意,root是这里的MySQL根用户,而不是系统根用户):

/usr/local/mysql/bin/mysqladmin --port=8889 -u root shutdown

#3


1  

Try this for Amazon Linux AMI or for centOS

在Amazon Linux AMI或centOS上试试这个

sudo service mysqld restart

#4


0  

osx could be using launchctl to launch mysql. Try this:

osx可以使用launchctl来启动mysql。试试这个:

sudo launchctl unload -w /Library/LaunchDaemons/com.mysql.mysqld.plist

#5


0  

Donal had the right solution for me. However, the updated plist name for 2017 is

Donal给我的解决办法是对的。然而,2017年更新的plist名称是

com.oracle.oss.mysql.mysqld.plist.

#6


0  

in my case (RHEL7 and MariaDB) this works.

在我的例子中(RHEL7和MariaDB),这起作用了。

sudo systemctl restart mariadb