
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MaGiAsHoK Experiences &#187; Smarty</title>
	<atom:link href="http://www.magiashok.com/tag/smarty/feed" rel="self" type="application/rss+xml" />
	<link>http://www.magiashok.com</link>
	<description>Share My thoughts On Day To Day challanges!</description>
	<lastBuildDate>Sat, 04 Sep 2010 13:11:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>MySQL Error</title>
		<link>http://www.magiashok.com/mysql-error.htm</link>
		<comments>http://www.magiashok.com/mysql-error.htm#comments</comments>
		<pubDate>Wed, 09 Jan 2008 19:28:19 +0000</pubDate>
		<dc:creator>MaGiAsHoK</dc:creator>
				<category><![CDATA[MYSQL]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Securenext]]></category>
		<category><![CDATA[Smarty]]></category>
		<category><![CDATA[TCP/IP]]></category>

		<guid isPermaLink="false">http://magiashok.wordpress.com/2008/01/09/mysql-error/</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>Today in morning when I checked my email, I found that there was an email with subject <b>FAILURE ALERT</b>, saying that my site was down at 5.56am, when I checked other mails I found that there was another email with <b>RECOVERY ALERT</b> 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.</p>
<p>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 <a href="http://magiashok.wordpress.com">magiashok.wordpress.com</a>. It was also showing database error. I checked my another 3 -4 sites all were showing database error.</p>
<p>Initially I thought that some of the tables of my database has corrupted. I opened <a href="http://www.webyog.com/" target="_blank">SQLyog tool</a> which I use generally in place of <a href="http://www.phpmyadmin.net/" target="_blank">phpmyadmin</a> 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.</p>
<p>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.</p>
<p>I login in to my control panel and tried to open phpmyadmin through it. Again it was refused with this error message: <b>Error connecting to MySQL: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)</b>. 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.</p>
<p>So I just <a href="http://www.google.com/" target="_blank">googled</a> the error message, and found that I was not the only one who has faced this problem.</p>
<p>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.</p>
<p>I login to server and found that <b>mysql.sock</b> file were not present in directory <b>/var/lib/mysql</b> whereas it should be there.</p>
<p>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.<br />
Technorati Tags: <a href="http://technorati.com/tag/Mysql+Error" target="_blank" rel="tag">Mysql Error</a>, <a href="http://technorati.com/tag/mysqld" target="_blank" rel="tag"> mysqld</a>, <a href="http://technorati.com/tag/mysql.sock" target="_blank" rel="tag"> mysql.sock</a>, <a href="http://technorati.com/tag/phpmyadmin" target="_blank" rel="tag"> phpmyadmin</a>, <a href="http://technorati.com/tag/SQLyog" target="_blank" rel="tag"> SQLyog</a>, <a href="http://technorati.com/tag/database+error" target="_blank" rel="tag"> database error</a></p>
<p class="author">ashok</p>
]]></content:encoded>
			<wfw:commentRss>http://www.magiashok.com/mysql-error.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
