Solved

mysqld can't start as root (linux)

Posted on 2014-01-26
4
6,229 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 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

Get Database Help Now w/ Support & Database Audit

Keeping your database environment tuned, optimized and high-performance is key to achieving business goals. If your database goes down, so does your business. Percona experts have a long history of helping enterprises ensure their databases are running smoothly.

Question has a verified solution.

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

Suggested Solutions

Creating and Managing Databases with phpMyAdmin in cPanel.
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

738 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