Solved

mysqld can't start as root (linux)

Posted on 2014-01-26
4
6,632 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 35

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 35

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.

617 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