- Joined
- Dec 8, 2012
- Messages
- 773
- Points
- 63
Today I made some changes on MySQL configuration file and restart Mysql server with the command
but whoopp... it made website databases error and MySQL could not be restarted.
This is my way to solve this problem
After that, restarted Mysql and succeeded.
But where is my.cnf ? it was moved to my.cnf.old and I will lose this mysql configuration file?
I tried to copy the backup file my.cnf to /var/lib/mysql/ and restarted Mysql again but still getting same error.
This make sure that It will stop all mysql services including PID file (/var/lib/mysql/server.example.com.pid)
now I copied file my.cnf back and start mysql again
Hope I will not face this problem any more
Regards,
Code:
sudo service mysqld start
I tried to find solutions on Google and more results from stackoverflow or serverfault but most answers are common and could not solve this problem completely.[root@server ~]# sudo service mysqld start
Starting MySQL... ERROR! The server quit without updating PID file (/var/lib/mysql/server.example.com.pid).
This is my way to solve this problem
Code:
mv /etc/my.cnf /etc/my.cnf.old
Code:
[root@server ~]# service mysqld restart
Shutting down MySQL.. SUCCESS!
I tried to copy the backup file my.cnf to /var/lib/mysql/ and restarted Mysql again but still getting same error.
So I tried this way[root@server ~]# sudo service mysqld start
Starting MySQL... ERROR! The server quit without updating PID file (/var/lib/mysql/server.example.com.pid).
Code:
sudo killall mysqld
now I copied file my.cnf back and start mysql again
Code:
service mysqld restart
The problem is solved and I can use my.cnf as before.[root@server ~]# sudo service mysqld start
Starting MySQL SUCCESS!
Hope I will not face this problem any more
Regards,