Solved

mysqld can't start as root (linux)

Posted on 2014-01-26
4
4,879 Views
Last Modified: 2014-01-26
Hi Experts,

I'm running funplug on a NAS drive and want to setup mysqld on it.  I've got it going pretty far, but now when I try to start up with 'mysqld restart' I get the following error:

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

fine.  I've got no server running and so I can't create more mysql users.  So how can I get this going from the command line without using mysql?  (chicken & egg?)

Thanks,
Mike
0
Comment
Question by:thready
  • 2
4 Comments
 
LVL 24

Accepted Solution

by:
johanntagle earned 500 total points
ID: 39810644
You didn't describe how you installed your mysql instance, so it's hard to determine where exactly you went wrong.  However, it looks like you are attempting to run mysql with the root user, which is a big no-no.  The specific security section of the manual mentioned in the error message is here:

http://dev.mysql.com/doc/refman/5.5/en/changing-mysql-user.html

Suggest you check it out and start your troubleshooting from there.
0
 
LVL 34

Expert Comment

by:Duncan Roe
ID: 39810711
First ensure the user mysql is registered. It should have an impossible shell (like /bin/false) and its home directory should be the database repository (at least, I made mine that way, not sure if it's essential). Liek this
09:21:05$ cat /etc/passwd|grep mysql 
mysql:x:27:27:MySQL:/var/lib/mysql:/bin/false

Open in new window

Now you can start mysqld from the root command line with one of the following
mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/run/mysql/mysql.pid &
mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/run/mysql/mysql.pid --skip-networking &

Open in new window

Use --skip-networking if you only want to use the Unix socket. The instructions assume you originally installed the database using the command mysql_install_db --user=mysql
0
 
LVL 34

Expert Comment

by:Duncan Roe
ID: 39810717
You should have a file called rc.mysqld somewhere under /etc/rc.d. If you cd to the directory containing it, you can issue commands like ./rc.mysqld start, ./rc.mysqld stop and so on.
0
 
LVL 1

Author Comment

by:thready
ID: 39810720
crap so sorry- i accepted this just as i got your answers.... i got it working...  THanks for your responses!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now