• Register
0 votes

Problem :

Looking for the solution of the following Security error.
fatal error: please read "security" section of the manual to find out how to run mysqld as root!
6 5 3
6,930 points

2 Answers

0 votes

Solution :

One should not execute MySQL daemon as the system user as root which do not has any restrictions.

 I guess you wanted to execute the initscript instead:

sudo /etc/init.d/mysql stop

Another way is to use the mysqladmin tool. Please note here root is the MySQL root user and not the system root user.

/usr/local/mysql/bin/mysqladmin --port=8889 -u root shutdown
If you follow above steps your issue will be resolved.
9 7 4
38,600 points
0 votes


I'm exercising OS X  and this error occured to me at the time I upgraded from Mavericks to Yosemite. It was solved by employing this command

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

The MySQL daemon must not be evolved as the system user root which (generally) do not has any restrictions.

According to your cli, I consider you wanted to formed the initscript instead:

sudo /etc/init.d/mysql stop

Another method would be to employ the mysqladmin tool (notify, root is the MySQL root user here, not the system root user):

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

Attempt this for Amazon Linux AMI or for centOS

sudo service mysqld restart

you might attempt this in case you logged in with root:

mysqld --user=root

osx could be exercising launchctl to launch mysql. Attempt this:

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

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


There are various solutions:

1. By appending a command-user=root create mandatory root account startup.

mysqld --user=root

2. Begin mysqld with an ordinary user. This user should belong to the mysqld user group.

edit/etc/my.cnfDocument in[mysqld]Next include startup user MySQL


On startup, add—user=mysql

mysqld --user=mysql


10 6 4
31,120 points

Related questions

0 votes
1 answer 26 views
Problem: I am new, I need help, can anyone help? The section of an inode that stores permissions is referred to as what?
asked Feb 21 maddi86 5.4k points
0 votes
2 answers 78 views
Problem : While trying to compile my C program I encountered following error agreeing to the xcode/ios license requires admin privileges, please re-run as root via sudo.
asked Nov 16, 2019 peterlaw 6.9k points
0 votes
1 answer 1.8K views
Problem : Following is my issue: I tried to install mysqlclient like below : C:\Users\alecxe>pip install mysqlclient Collecting mysqlclient Using cached https://files.pythonhosted.org/packages/ec/fd/83329b9d3e14f7344d1 cb31f128e6dbba70c5975c9e57896815dbb1988ad/mysqlclient-1.3.13.tar.gz Installed ... beginner to this and would be very happy if any input as to how to go about fixing above error.
asked Dec 27, 2019 alecxe 7.5k points
0 votes
1 answer 28 views
Problem : I have a Stored procedure like below: CREATE PROCEDURE MyProG() BEGIN SELECT * FROM `hs_hr_employee_leave_quota`; END But it gives me the below error: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3 What does this error mean? What is wrong with my line number 2?
asked Jan 30 jwilliam 3.9k points