• Register
search
Log In
0 votes
94 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.9k 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.
36.1k 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

 

12.8k points
edited by

Related questions

0 votes
1 answer 25 views
25 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 56 views
56 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 850 views
850 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
1 vote
1 answer 29 views
29 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 stewart 4k points
0 votes
1 answer 23 views
23 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