MySql server PID not found
I got the same error on a CentOS 6.3 where I upgraded MySQL to 5.6.14 but I kept the old my.cnf file. After upgrade, MySQL did not start anymore, giving me the same error as you described.
The problem was that I had this setting in my.cnf:
table_cache=2048
According to this link table_cache renamed table_open_cache..
"Seem like in 5.5 the system variable table_cache was renamed table_open_cache.. In 5.6 mysqld fails if it finds an unknown variable this means that upgrades from versions earlier than 5.5 can have problems if table_cache is specified in my.cnf."
After I changed the above line to
table_open_cache=2048
MySQL started perfectly.
So, in the case you have MySQL 5.5+ (and maybe an older my.cnf), I suggest you to do the following:
- remove my.cnf from /etc folder and try to start MySQL
- if MySQL starts, the the problem is in my.cnf. Comment/uncomment all the settings one by one in order to see which is causing the problem.
Hope this helps.
First of all make sure that which folder/file is not exist in /var/run/mysqld/mysqld.pid
if dir not exists then create it as:
sudo mkdir -p /var/run/mysqld/
if mysqld.pid is not exists then create it as:
sudo touch /var/run/mysqld/mysqld.pid
change ownership as:
sudo chown mysql:mysql -R /var/run/mysqldchmod 775 -R /var/run/mysqld
restart mysql service
sudo service mysql restart