<?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>SupportSages &#187; phpmyadmin</title>
	<atom:link href="http://www.supportsages.com/blog/tag/phpmyadmin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.supportsages.com/blog</link>
	<description>Technical Support and Server Management : Musings in the fox hole.</description>
	<lastBuildDate>Thu, 05 Jan 2012 03:05:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>MySQL for Beginners</title>
		<link>http://www.supportsages.com/blog/2011/02/mysql-for-beginners/</link>
		<comments>http://www.supportsages.com/blog/2011/02/mysql-for-beginners/#comments</comments>
		<pubDate>Fri, 04 Feb 2011 16:12:40 +0000</pubDate>
		<dc:creator>vince</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[cPanel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[mysqldump]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[repair]]></category>
		<category><![CDATA[WHM]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=1753</guid>
		<description><![CDATA[In this post, I'll explain some basic MySQL tips that would be very useful for beginners

<strong>Reset MySQL root password</strong>

Log in as Root and Stop the MySQL daemon. Then Start the MySQL daemon and skip the grant tables which store the passwords.

[bash]# /etc/init.d/mysql stop[/bash]

[bash]# mysqld_safe --skip-grant-tables[/bash]

[bash]# mysql -u root[/bash]

[bash]mysql&#62; use mysql;[/bash]

Now you should be able to connect to mysql without a password. If not, it might be some other issues. Execute the command to reset the password

[bash]mysql&#62; update user set Password=PASSWORD('new-password') where user='root';
mysql&#62; flush privileges;
mysql&#62; exit[/bash]

After this you need to kill the running mysqld and restart it normally.

<strong>Creation of MySQL database, ...]]></description>
			<content:encoded><![CDATA[<p>In this post, I&#8217;ll explain some basic MySQL tips that would be very useful for beginners</p>
<p><strong>Reset MySQL root password</strong></p>
<p>Log in as Root and Stop the MySQL daemon. Then Start the MySQL daemon and skip the grant tables which store the passwords.</p>
<pre class="brush: bash; title: ; notranslate"># /etc/init.d/mysql stop</pre>
<pre class="brush: bash; title: ; notranslate"># mysqld_safe --skip-grant-tables</pre>
<pre class="brush: bash; title: ; notranslate"># mysql -u root</pre>
<pre class="brush: bash; title: ; notranslate">mysql&gt; use mysql;</pre>
<p>Now you should be able to connect to mysql without a password. If not, it might be some other issues. Execute the command to reset the password</p>
<pre class="brush: bash; title: ; notranslate">mysql&gt; update user set Password=PASSWORD('new-password') where user='root';
mysql&gt; flush privileges;
mysql&gt; exit</pre>
<p>After this you need to kill the running mysqld and restart it normally.</p>
<p><strong>Creation of MySQL database, user and access rights</strong></p>
<p>It should be very easy to create a database through cpanel or some other panel. But if you are on your own with only Shell access, try this :</p>
<pre class="brush: bash; title: ; notranslate"># mysql -u root -p
 mysql&gt; use mysql;
 mysql&gt; INSERT INTO db (Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv) VALUES  ('%','databasename','username','Y','Y','Y','Y','Y','N');
 mysql&gt; flush privileges;
</pre>
<p>Or you can use</p>
<pre class="brush: bash; title: ; notranslate">
mysql&gt; grant all privileges on databasename.* to username@localhost;
mysql&gt; flush privileges;
</pre>
<p><strong>MySQLdump and Restore</strong></p>
<p>The <strong>mysqldump</strong> client is a database backup.  It can be used to dump a         database or a collection of databases for backup or transfer to         another SQL server (not necessarily a MySQL server). The dump         typically contains SQL statements to create the table, populate         it, or both.</p>
<p>Creating a Mysqldump is quite easy. If you know the database name, say database :</p>
<pre class="brush: bash; title: ; notranslate"># mysqldump database &gt; database.sql</pre>
<p>When restoring a Database, make sure you login as the user. In other words, do not restore a database with root privileges. It may cause real damage. Assuming that you are logged in as the user</p>
<pre class="brush: bash; title: ; notranslate">&lt;strong&gt; &lt;/strong&gt;
mysql&gt; use dbname; //Which is the database which the backup has to be restored to
mysql &gt; source olddb.sql; //Backup
</pre>
<p><strong>Repair a corrupted Database</strong></p>
<p>Switch to the database directory which is having issues with, Like :</p>
<pre class="brush: bash; title: ; notranslate"># cd /var/lib/mysql/database</pre>
<p>Stop the MySQL server</p>
<pre class="brush: bash; title: ; notranslate"># /etc/init.d/mysql stop</pre>
<p>Check the tables</p>
<pre class="brush: bash; title: ; notranslate"># myisamchk *.MYI</pre>
<p>Repair the tables</p>
<pre class="brush: bash; title: ; notranslate"># myisamchk -r *.MYI</pre>
<p>Start the MySQL server</p>
<pre class="brush: bash; title: ; notranslate"># /etc/init.d/mysql start</pre>
<p><strong>phpMyadmin</strong></p>
<p>phpMyAdmin is an open source tool written in PHP intended to handle the administration of MySQL over the World Wide Web. It can perform various tasks such as creating, modifying or deleting databases, tables, fields or rows; executing SQL statements; or managing users and permissions.</p>
<p>If you are having a cPanel or WHM interface, its quite easy to manage a database. In cPanel interface, go to Databases section</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/02/cpanel_phpmyadmin.png" class="thickbox no_icon" rel="gallery-1753" title="cpanel_phpmyadmin"><img class="alignnone size-full wp-image-1770" title="cpanel_phpmyadmin" src="http://www.supportsages.com/blog/wp-content/uploads/2011/02/cpanel_phpmyadmin.png" alt="" width="513" height="114" /></a></p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/02/whm_phpmyadmin.png" class="thickbox no_icon" rel="gallery-1753" title="whm_phpmyadmin"><img class="alignnone size-large wp-image-1772" title="whm_phpmyadmin" src="http://www.supportsages.com/blog/wp-content/uploads/2011/02/whm_phpmyadmin-1024x191.png" alt="" width="500" height="110" /></a></p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/02/phpmyadmin_main.png" class="thickbox no_icon" rel="gallery-1753" title="phpmyadmin_main"><img class="alignnone size-medium wp-image-1775" title="phpmyadmin_main" src="http://www.supportsages.com/blog/wp-content/uploads/2011/02/phpmyadmin_main-300x127.png" alt="" width="500" height="250" /></a></p>
<p>This is the main phpMyadmin page.</p>
<p>In WHM, at SQL Services you can perform a variety of options. As mentioned earlier, the database repair option (for corrupted databases) can be performed here also. Access the option &#8216;Repair a Database&#8217;</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/02/repair_db_pma.png" class="thickbox no_icon" rel="gallery-1753" title="repair_db_pma"><img class="alignnone size-medium wp-image-1774" title="repair_db_pma" src="http://www.supportsages.com/blog/wp-content/uploads/2011/02/repair_db_pma-300x77.png" alt="" width="500" height="120" /></a></p>
<p>Select the Database name and Click Repair Database.</p>
<p>These are quite simple tasks associated with MySQL operations.</p>
<div class="tweetthis" style="text-align:left;"><p> <a  class="tt" href="http://twitter.com/home/?status=MySQL+for+Beginners+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1753" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=MySQL+for+Beginners+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1753" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2011/02/mysql-for-beginners/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Internal server errors while accessing Fantastico and phpmyadmin in cPanel &amp; WHM</title>
		<link>http://www.supportsages.com/blog/2009/04/internal-server-errors-while-accessing-fantastico-and-phpmyadmin-in-cpanel-whm/</link>
		<comments>http://www.supportsages.com/blog/2009/04/internal-server-errors-while-accessing-fantastico-and-phpmyadmin-in-cpanel-whm/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 07:44:12 +0000</pubDate>
		<dc:creator>George</dc:creator>
				<category><![CDATA[cPanel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[500 ISE]]></category>
		<category><![CDATA[Fantastico]]></category>
		<category><![CDATA[phpmyadmin]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=36</guid>
		<description><![CDATA[Not a common issue. But sometimes this happens. If you have noticed, when you are logged into cPanel or WHM using the root password, you wont be able to install Fantastico applications or access MySQL DBs using phpmyAdmin. Most of the times, the error occurs will be similar to below

<blockquote>Internal Server Error

Premature end of script headers: php: Please check /usr/local/cpanel/logs/error_log for the exact error.</blockquote>

So far, the solution of this issue didn't get complicated and a simple recompilation of cPanel PHP used to solve the error. To recompile cPanel PHP, issue the command below

<strong><code>/scripts/makecpphp</code></strong>

This would make sure that cPanel PHP, suPHP ...]]></description>
			<content:encoded><![CDATA[<p>Not a common issue. But sometimes this happens. If you have noticed, when you are logged into cPanel or WHM using the root password, you wont be able to install Fantastico applications or access MySQL DBs using phpmyAdmin. Most of the times, the error occurs will be similar to below</p>
<blockquote><p>Internal Server Error</p>
<p>Premature end of script headers: php: Please check /usr/local/cpanel/logs/error_log for the exact error.</p></blockquote>
<p>So far, the solution of this issue didn&#8217;t get complicated and a simple recompilation of cPanel PHP used to solve the error. To recompile cPanel PHP, issue the command below</p>
<p><strong><code>/scripts/makecpphp</code></strong></p>
<p>This would make sure that cPanel PHP, suPHP and other permissions will get set properly. Good luck.</p>
<div class="tweetthis" style="text-align:left;"><p> <a  class="tt" href="http://twitter.com/home/?status=Internal+server+errors+while+accessing+Fantastico+and+phpmyadmin+in+cPanel+%26+WHM+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F36" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=Internal+server+errors+while+accessing+Fantastico+and+phpmyadmin+in+cPanel+%26+WHM+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F36" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2009/04/internal-server-errors-while-accessing-fantastico-and-phpmyadmin-in-cpanel-whm/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

