Hello Ashok!

My Experience with affiliate and internet marketing

Archive for the ‘MySQL’ Category

26
Jan
2007

Today in morning when I checked my email, I found that there was an email with subject FAILURE ALERT, saying that my site was down at 5.56am, when I checked other mails I found that there was another email with RECOVERY ALERT informing that site was recovered at 6.46 means downtime was of 50mins. I thought once in two three months these downtime is not uncommon.

But after 5 minute when I visited one of my site, I found mysql connect error, I shocked what the hell is this. Then I opened my this blog helloashok.com. It was also showing database error. I checked my another 3 -4 sites all were showing database error.

Initially I thought that some of the tables of my database has corrupted. I opened SQLyog tool which I use generally in place of phpmyadmin to access database, SQLyog connected smoothly with my database server and showed me all database, there was no error in database and all tables were fine.

I opened phpmyadmin via browser, but it was also refusing to connect saying incorrect userid of password. It was really a puzzling situation I was able to connect to my database server via SQLyog but not via phpmyadmin.

I login in to my control panel and tried to open phpmyadmin through it. Again it was refused with this error message: Error connecting to MySQL: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2). I thought ok, atleast I got an error message means half problem has been solved. Before that I was getting error message of access denied, which was not throwing any light in the problem.

So I just googled the error message, and found that I was not the only one who has faced this problem.

The reason of connecting through SQLyog and not through phpmyadmin was that SQLyog was connecting via TCP/IP where as phpmyadmin and my sites were connecting to database through socket.

I login to server and found that mysql.sock file were not present in directory /var/lib/mysql whereas it should be there.

The solution of this was simple i restarted my mysqld and refreshed my blog and vow it was open. Mysqld when restarted created the mysql.sock file and the problem rectified.

Technorati Tags: , , , , ,

ashok

Post a Comment

Web Hosting India