Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

sql

mysql

my.cnf

People also ask

How do I start mysqld as root?

To ensure this, run mysqld_safe as root and include the --user option as shown. Otherwise, you should execute the program while logged in as mysql , in which case you can omit the --user option from the command.

What does mysqld command do?

mysqld, also known as MySQL Server, is a single multithreaded program that does most of the work in a MySQL installation. It does not spawn additional processes. MySQL Server manages access to the MySQL data directory that contains databases and tables.

How do I terminate MySQL?

When the MySQL shell loads, the prompt displays mysql> . To locate a process to kill or terminate, load the list with all active sessions. You may have more entries on your list. Note the Id of the process you want to kill.


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

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

you might try this if you logged in with root:

mysqld --user=root

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

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

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):

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

Try this for Amazon Linux AMI or for centOS

sudo service mysqld restart