• Register
0 votes
294 views

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

Please log in or register to answer this question.

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

Solution:

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

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

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

[mysqld]
user=mysql

On startup, add—user=mysql

mysqld --user=mysql

 

10 6 4
31,120 points

Related questions

0 votes
1 answer 3 views
3 views
Problem: I am trying to reset password for root user and I have successfully executed below commands service mysql stop Created and saved a text file /home/me/mysql-init containing the following statement on a single line. SET PASSWORD FOR 'root'@'localhost' = ... Aborting I am using Mysql Version 5.6 and following the given documentation dev.mysql.com/doc/refman/5.6/en/resetting-permissions.html
asked Apr 26 sumaiya simi 43.9k points
1 vote
1 answer 10 views
10 views
Problem: Facing serious issue during MySQL installation. Fatal error: can't open and lock privilege tables: table 'mysql.host' doesn't exist.
asked Mar 26 PkGuy 23.5k points
0 votes
0 answers 50 views
0 votes
1 answer 1 view
1 view
Problem: Please help me >How to reset the root password in the mysql reference manual?
asked 9 hours ago Rada Gracelynn 1.8k points
0 votes
1 answer 8 views
8 views
Problem: What am I purported to do with this problem? >Check the manual that corresponds to your mysql server version.
asked 1 day ago Ashok Dileep 2.5k points
0 votes
1 answer 7 views
7 views
Problem: I am unable to open LAMP, uninstall it or reinstall it for this problem: Error 2002 (hy000): can't connect to local mysql server through socket. How can I solve this?
asked Apr 22 muktaa 34.6k points
1 vote
1 answer 9 views
9 views
Problem : I'm new to Linux and MySQL, I currenty have a LAMP, running on Ubuntu 14.04, yesterday everything was fine, but today my MYSQL is not working.I get the following error message: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) I have no ideia about what to do!
asked Mar 31 Sabbir Hossain 14.6k points
1 vote
1 answer 5 views
5 views
Problem: Any solution to this error? Securityerror: error #2060: security sandbox violation.
asked Mar 28 PkGuy 23.5k points
1 vote
1 answer 4 views
4 views
Problem: I am attemopting to run mysql without password but getting thios error. Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
asked Apr 24 PkGuy 23.5k points
0 votes
1 answer 6 views
6 views
Problem My problem started off with me not being able to log in as root any more on my mysql install. I was attempting to run mysql without passwords turned on... but whenever I ran the command # mysqld_safe --skip-grant-tables & I would never get the prompt back. I ... mysql-client again. But I've noticed that it doesn't prompt me for a password. Isn't it supposed to ask for an admin password?
asked Apr 20 munim01 21k points