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






Leave a Reply