Error-mysql is running but pid…

MySQL

1.Check for mysql directory:
[[email protected] ~]# ll /var/run/mysql
ls: /var/run/mysql: No such file or directory

2.Create a mysql directory:
[[email protected] ~]# mkdir /var/run/mysql

3.Enter into the created directory:
[[email protected] ~]# cd /var/run/mysql/

4.Create the mysqld process id:
[[email protected] mysql]# touch mysqld.pid

5.Changing the ownership of mysqld.pid
[[email protected] mysql]# chown mysql:mysql mysqld.pid

6.Restart the MySQL:
[[email protected] mysql]# /etc/init.d/mysql restart
ERROR! MySQL manager or server PID file could not be found!
Starting MySQL………………………………………………………… ……………………………. SUCCESS!

7.Check the Status of MySQL:
[[email protected] mysql]# /etc/init.d/mysql status
SUCCESS! MySQL running (1583)
Thats it!!!