• Register
0 votes
222 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
0 answers 39 views
0 votes
1 answer 37 views
37 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, 2020 maddi86 5.4k points
0 votes
2 answers 110 views
110 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 2.7K views
2.7K 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 84 views
84 views
Problem : My problem kicked off when I was unable to log in as the root any more on the mysql install. I was trying to run mysql without the passwords turned on however when I ran my below command : # mysqld_safe --skip-grant-tables & I never got my prompt back. ... socket '/var/run/mysqld/mysqld.sock' (2)' Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
asked Jan 4, 2020 alecxe 7.5k points
0 votes
1 answer 44 views
44 views
Problem : My problem started with me when I was unable to log in as root any more on the mysql install. I was trying to run mysql without passwords turned on... but whenever I ran the below command # mysqld_safe --skip-grant-tables & I would never get my prompt back ... socket '/var/run/mysqld/mysqld.sock' (2)' Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
asked Dec 27, 2019 alecxe 7.5k points
0 votes
1 answer 69 views
69 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, 2020 jwilliam 3.9k points
0 votes
1 answer 2 views
2 views asked Feb 18 Akhil k 1.3k points
1 vote
1 answer 283 views
283 views
Problem : I am very new to SQL Queries. Recently I have joined new team and I am given below task Find the country that has all the vowels and no spaces in its name? I have written below query SELECT country FROM world WHERE country LIKE '%u'       and country LIKE ... of time in writing the correct query but still unable to do it. So I am looking for sql experts help in fixing my above query.
asked Apr 17, 2020 stewart 4k points