<?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>Linux Servers cPanel webhosting blog &#187; mysql service</title>
	<atom:link href="http://www.theperfectarts.com/tag/mysql-service/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.theperfectarts.com</link>
	<description>Basics cPanel tutorials / issue,mysql,php errors etc</description>
	<lastBuildDate>Sun, 11 Jul 2010 23:05:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>mysql has failed, please contact the sysadmin (result was &#8220;mysql has failed&#8221;).</title>
		<link>http://www.theperfectarts.com/2009/09/mysql-has-failed-please-contact-the-sysadmin-result-was-mysql-has-failed/</link>
		<comments>http://www.theperfectarts.com/2009/09/mysql-has-failed-please-contact-the-sysadmin-result-was-mysql-has-failed/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 20:02:06 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[Mysql + phpmyadmin]]></category>
		<category><![CDATA[Access denied for user 'root'@'localhost']]></category>
		<category><![CDATA[mysql from WHM]]></category>
		<category><![CDATA[mysql has failed]]></category>
		<category><![CDATA[mysql service]]></category>
		<category><![CDATA[mysql service from WHM]]></category>
		<category><![CDATA[please contact the sysadmin]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=223</guid>
		<description><![CDATA[Now a most common problem we are facing with the mysql on newly installed server if we have mysql 5 we mostly receive following error message when starting mysql service from WHM &#8220;mysql has failed, please contact the sysadmin (result was &#8220;mysql has failed&#8221;).&#8221; As well as when ever we run mysql from shell its [...]]]></description>
			<content:encoded><![CDATA[<p>Now a most common problem we are facing with the mysql on newly installed server if we have mysql 5 we mostly receive following error message when starting mysql service from WHM</p>
<p><span style="color: #800000;">&#8220;mysql has failed, please contact the sysadmin (result was &#8220;mysql has failed&#8221;).&#8221;</span></p>
<p>As well as when ever we run mysql from shell its gives error message</p>
<p><span style="color: #800000;">&#8220;Access denied for user &#8216;root&#8217;@'localhost&#8217; (using password: YES)&#8221;.</span></p>
<p><span style="color: #800000;">In that case we need to remove mysql from server and reinstall it by using following commands.</span></p>
<p>1)Login into server as root user</p>
<p><span style="color: #800000;">root@Gunjan [~]# which mysql<br />
/usr/bin/mysql</span></p>
<p><span style="color: #800000;">root@Gunjan [~]#mv /usr/bin/mysql /usr/bin/mysql-back</span></p>
<p><span style="color: #800000;">root@Gunjan [~]mv /var/lib/mysql /var/lib/mysql-back</span></p>
<p><span style="color: #800000;">root@Gunjan [~]/scripts/mysqlup  &#8211;force</span></p>
<p>Now reset the root password from <span style="color: #800000;">WHM &gt;&gt; Main &gt;&gt; SQL Services &gt;&gt; MySQL Root Password</span></p>
<p>Now you will able to access mysql without any problem <img src='http://www.theperfectarts.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><span style="color: #800000;"><br />
</span></p>
<p>Some time above solution also not allowing to access mysql still throws following error message.</p>
<p><span style="color: #800000;">root@server[~]#mysql</span><br />
&#8220;Access denied for user &#8216;root&#8217;@'localhost&#8217;</p>
<p>In that case refer following steps but carefully as it will cause you database loss.</p>
<p><span style="color: #800000;">root@server[~]#/etc/init.d/mysql stop</span></p>
<p><span style="color: #800000;">root@server[~]#mv /var/lib/mysql/ /var/lib/mysql-back</span></p>
<p><span style="color: #800000;">root@server[~]#mv /etc/my.cnf /etc/my.cnf-back</span></p>
<p><span style="color: #800000;">root@server[~]#/scripts/mysqlup &#8211;force</span></p>
<p><span style="color: #800000;">root@server[~]#/etc/init.d/mysql start</span></p>
<p><span style="color: #800000;">root@server[~]#mysql</span><br />
Welcome to the MySQL monitor.  Commands end with ; or \g.<br />
Your MySQL connection id is 1430564<br />
Server version: 5.0.85-community MySQL Community Edition (GPL)</p>
<p>Type &#8216;help;&#8217; or &#8216;\h&#8217; for help. Type &#8216;\c&#8217; to clear the current input statement.</p>
<p>mysql&gt; \q<br />
Bye</p>
<p>Now you can restore the databases from /var/lib/mysql-back to /var/lib/mysql</p>
<p>&copy;2010 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2009/09/mysql-has-failed-please-contact-the-sysadmin-result-was-mysql-has-failed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
