Hello. My name's Kate. I love Linux, WordPress - own a WordPress dedicated design studio, a beginner entrepreneur who co-founded Asia software company. This is where i blog about Linux, WordPress, daily life and other interesting stuff
Status: available

You are on the Nineteen Labs » Failed to stop mysqld services article.

Failed to stop mysqld services

Running services mysqld stop or /etc/rc.d/init.d/mysqld stop [failed]

First, do this : # ps -ef | grep mysqld
If showing up :
# /usr/libexec/mysqld --defaults-f lib/mysql --user=mysql –pid-file=/var/run/mysqld/mysqld.pid –skip-locking

Look in to /var/run/mysqld to find mysqld.pid
# cd /var/run/mysqld
# ll

If there’s no mysqld.pid inside /var/run/mysqld directory, create mysqld.pid
# touch mysqld.pid

Assign chown to a mysqld.pid file
# chown -R mysql:mysql mysqld.pid
Why do we assign mysql:mysql to the file?
Because the warning shows –user=mysql

Assign chmod to a mysqld.pid file
# chmod g=rw mysqld.pid
# chmod o= mysqld.pid

It changes permission to a format : -rw-rw----

Assign chown to the directory, /var/run/mysqld. Why? because the owner permission for this directory isn’t mysql.
# chown mysql:mysql /var/run/mysqld

Restart Server
# reboot

Stop mysqld
# /etc/rc.d/init.d/mysqld stop
Result : [ok]

Start mysqld
# /etc/rc.d/init.d/mysqld start
Result : [ok]

Check log
# vi /var/log/mysqld.log

Share : These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • SphereIt
  • BlinkList
  • Reddit
  • StumbleUpon

Leave a Reply

This site powered : WordPress. Made with PC (sorry, MAC), Coffee and Tofu