<?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>PRESOON.COM &#187; Mysql</title>
	<atom:link href="http://presoon.com/blog/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://presoon.com/blog</link>
	<description></description>
	<lastBuildDate>Sat, 20 Mar 2010 03:59:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to change Mysql database directory to another partition in cPanel. /var patition full</title>
		<link>http://presoon.com/blog/2010/01/07/how-to-change-mysql-database-directory-to-another-partition-in-cpanel-var-patition-full/</link>
		<comments>http://presoon.com/blog/2010/01/07/how-to-change-mysql-database-directory-to-another-partition-in-cpanel-var-patition-full/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 07:39:59 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[/var partition full]]></category>
		<category><![CDATA[/var/lib/mysql]]></category>
		<category><![CDATA[change mysql data directory in mysql]]></category>
		<category><![CDATA[move /var/lib/mysql to another partition]]></category>
		<category><![CDATA[separate mysql data directory]]></category>

		<guid isPermaLink="false">http://presoon.com/blog/?p=154</guid>
		<description><![CDATA[Hi guys,
you might have faced the issue of /var partition gettting full regularly due to database directory. If you have a larger partition with free space, then it is possible to move the database directory to the larger partition.
Here are the steps
Switch off the database server while we are moving the databases.

/etc/rc.d/init.d/mysql stop

I am considering [...]]]></description>
			<content:encoded><![CDATA[<p>Hi guys,</p>
<p>you might have faced the issue of /var partition gettting full regularly due to database directory. If you have a larger partition with free space, then it is possible to move the database directory to the larger partition.</p>
<p>Here are the steps</p>
<p>Switch off the database server while we are moving the databases.</p>
<pre>
<code>/etc/rc.d/init.d/mysql stop</code>
</pre>
<p>I am considering that I have enough space in /home partition. Here goes my new database data directory as /home/mysql</p>
<p>Now it is better to copy the database first, rather than move.</p>
<pre>
<code>cp -pr /var/lib/mysql /home
mv /var/lib/mysql /var/lib/mysql-bk</code>
</pre>
<p>We are copying the database to the new location since it is better to revert back the settings with minimum downtime, if anything goes wrong.</p>
<p>move to /tmp</p>
<pre>
<code>cd /tmp
unlink mysql.sock
ln -s /home/mysql/mysql.sock /tmp/mysql.sock</code>
</pre>
<p>Take a backup of /etc/my.cnf</p>
<p>Now edit /etc/my.cnf</p>
<pre>
<code>vi /etc/my.cnf

add the line
datadir=/home/mysql</code>
</pre>
<p>If the socket file is specified, comment it out.</p>
<p>Now move to /var/lib/mysql and create a symblink</p>
<pre>
<code>ln -s /home/mysql /var/lib/mysql</code>
</pre>
<p>(Please note that you don&#8217;t specify the socket file location in my.cnf since it causes issues with phpMyadmin)</p>
<p>For, cPanel server, edit the phpMyadmin configuration<br />
take a backup of &#8220;/usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php&#8221;</p>
<pre>
<code>edit this file /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php
vi /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php</code>
</pre>
<p>add the following lines. If they already exist, edit as below.<br />
(the connect_type usually exist at &#8220;tcp&#8221; change it to &#8220;socket&#8221;)</p>
<pre>
<code>$cfg['Servers'][$i]['socket'] = ‘/home/mysql/mysql.sock’;
$cfg['Servers'][$i]['connect_type'] = ’socket’;</code>
</pre>
<p>Now start the database server.</p>
<pre>
<code>/etc/rc.d/ini.d/mysql start</code>
</pre>
<p>If it starts fine, you are done. Check the database connections of your site.<br />
You can now remove the directory /var/lib/mysql-bk</p>
<p>Suggestions, questions are welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://presoon.com/blog/2010/01/07/how-to-change-mysql-database-directory-to-another-partition-in-cpanel-var-patition-full/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PhpMyAdmin Installation</title>
		<link>http://presoon.com/blog/2009/01/08/phpmyadmin-installation/</link>
		<comments>http://presoon.com/blog/2009/01/08/phpmyadmin-installation/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 12:18:42 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Mysql]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[mysql administration]]></category>
		<category><![CDATA[phpmyadmin]]></category>

		<guid isPermaLink="false">http://presoon.com/blog/?p=73</guid>
		<description><![CDATA[PhpMyAdmin Installation for a domain is so easy.
Enter into your webdirectory (public_html)
Download the source into it.
From shell
wget http://jaist.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-3.1.1-english.tar.gz
or download the source from http://jaist.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-3.1.1-english.tar.gz and upload it via FTP to your public_html
extract the contents
tar -zxf phpMyAdmin-3.1.1-english.tar.gz
Alternatively you may use the filemanger extract option for the purpose.
you can now access your phpmyadmin using the link
www.yourdomain.com/phpMyAdmin-3.1.1-english/
Before that you [...]]]></description>
			<content:encoded><![CDATA[<p>PhpMyAdmin Installation for a domain is so easy.</p>
<p>Enter into your webdirectory (public_html)</p>
<p>Download the source into it.</p>
<p>From shell</p>
<p>wget http://jaist.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-3.1.1-english.tar.gz</p>
<p>or download the source from http://jaist.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-3.1.1-english.tar.gz and upload it via FTP to your public_html</p>
<p>extract the contents</p>
<p>tar -zxf phpMyAdmin-3.1.1-english.tar.gz</p>
<p>Alternatively you may use the filemanger extract option for the purpose.</p>
<p>you can now access your phpmyadmin using the link</p>
<p>www.yourdomain.com/phpMyAdmin-3.1.1-english/</p>
<p>Before that you need to configure that.</p>
<p>You need to have</p>
<p>1 database</p>
<p>2 database user</p>
<p>3 database user password.</p>
<p>Now navigate to the directory libraries under /phpMyAdmin-3.1.1-english/ you will have a file named config.default.php.</p>
<p>You need to edit this file</p>
<p>===================<br />
$cfg['Servers'][$i]['host']          = &#8216;1002-2.lowesthosting.com&#8217;; // MySQL hostname or IP address<br />
$cfg['Servers'][$i]['port']          = &#8216;4455&#8242;;          // MySQL port &#8211; leave blank for default port<br />
$cfg['Servers'][$i]['socket']        = &#8216;/tmp/mysqlt.sock&#8217;;          // Path to the socket &#8211; leave blank for default socket<br />
$cfg['Servers'][$i]['connect_type']  = &#8217;socket&#8217;;       // How to connect to MySQL server (&#8216;tcp&#8217; or &#8217;socket&#8217;)<br />
$cfg['Servers'][$i]['extension']     = &#8216;mysql&#8217;;     // The php MySQL extension to use (&#8216;mysql&#8217; or &#8216;mysqli&#8217;)<br />
$cfg['Servers'][$i]['compress']      = FALSE;       // Use compressed protocol for the MySQL connection<br />
                                                    // (requires PHP &gt;= 4.3.0)<br />
$cfg['Servers'][$i]['controluser']   = &#8216;username&#8217;;          // MySQL control user settings<br />
                                                    // (this user must have read-only<br />
$cfg['Servers'][$i]['controlpass']   = &#8216;password&#8217;;          // access to the &#8220;mysql/user&#8221;<br />
                                                    // and &#8220;mysql/db&#8221; tables).<br />
                                                    // The controluser is also<br />
                                                    // used for all relational<br />
                                                    // features (pmadb)<br />
$cfg['Servers'][$i]['auth_type']     = &#8216;http&#8217;;    // Authentication method (config, http or cookie based)?<br />
$cfg['Servers'][$i]['user']          = &#8216;username&#8217;;      // MySQL user<br />
$cfg['Servers'][$i]['password']      = &#8216;password&#8217;;          // MySQL password (only needed<br />
                                                    // with &#8216;config&#8217; auth_type)<br />
$cfg['Servers'][$i]['only_db']       = &#8216;trial&#8217;;          // If set to a db-name, only<br />
                                                    // this db is displayed in left frame<br />
====================</p>
<p>Update the above with database name, username, password, control user and password which can be the same as db user and password.</p>
<p>Now try accessing the link www.yourdomain.com/phpMyAdmin-3.1.1-english/<br />
enter the login credentials.</p>
<p>Thats all.</p>
]]></content:encoded>
			<wfw:commentRss>http://presoon.com/blog/2009/01/08/phpmyadmin-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySql &gt;= 4.1 Client does not support authentication protocol&#8230;</title>
		<link>http://presoon.com/blog/2008/05/17/mysql-41-client-does-not-support-authentication-protocol/</link>
		<comments>http://presoon.com/blog/2008/05/17/mysql-41-client-does-not-support-authentication-protocol/#comments</comments>
		<pubDate>Fri, 16 May 2008 23:43:18 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Mysql]]></category>
		<category><![CDATA[authentication]]></category>

		<guid isPermaLink="false">http://presoon.com/blog/?p=54</guid>
		<description><![CDATA[If you upgrade your MySql server to &#62;= 4.1 you might get the following error:
Client does not support authentication protocol requested by server; consider upgrading MySQL client
This happens because the latest versions of MySql uses a new format for the password (it&#8217;s a longer hash). In order for old clients to continue to use the [...]]]></description>
			<content:encoded><![CDATA[<p>If you upgrade your MySql server to &gt;= 4.1 you might get the following error:</p>
<blockquote><p>Client does not support authentication protocol requested by server; consider upgrading MySQL client</p></blockquote>
<p>This happens because the latest versions of MySql uses a new format for the password (it&#8217;s a longer hash). In order for old clients to continue to use the newer server, you have to set the passwords on the server to their old format or upgrade your client. Because upgrading the client can sometimes be a pain, it&#8217;s often easier to just update the passwords to the old format on the server.</p>
<p>Run mysql and login as root:<br />
mysql -u root -p</p>
<p>Then, paste the following command, editing as necessary, to change the password of the user to the old format.</p>
<p>UPDATE mysql.user<br />
SET password=OLD_PASSWORD(&#8217;somepassword&#8217;)<br />
WHERE user=&#8217;someuser&#8217;<br />
AND host=&#8217;somehost&#8217;;</p>
<p>After you have set the passwords to the old format, flush the tables.</p>
<p>flush privileges;</p>
<p>Then exit the mysql client with &#8220;quit&#8221; and you are set.</p>
<p>For windows.</p>
<p>In my.ini file in the mySQL directory (C:\Program Files\MySQL\MySQL Server 4.1\my.ini),<br />
add the following line after [mysqld]</p>
<p>old_passwords</p>
]]></content:encoded>
			<wfw:commentRss>http://presoon.com/blog/2008/05/17/mysql-41-client-does-not-support-authentication-protocol/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mysql History  Commands typed</title>
		<link>http://presoon.com/blog/2008/05/07/mysql-history-commands-typed/</link>
		<comments>http://presoon.com/blog/2008/05/07/mysql-history-commands-typed/#comments</comments>
		<pubDate>Wed, 07 May 2008 04:05:39 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Mysql]]></category>
		<category><![CDATA[commands Mysql]]></category>

		<guid isPermaLink="false">http://presoon.com/blog/?p=50</guid>
		<description><![CDATA[Check your Mysql history file
======================
vi /root/.mysql_history
======================
If you don&#8217;t find the file under /root, find out the file using 
======================
locate .mysql_history
======================
]]></description>
			<content:encoded><![CDATA[<p>Check your Mysql history file</p>
<p>======================<br />
vi /root/.mysql_history<br />
======================</p>
<p>If you don&#8217;t find the file under /root, find out the file using </p>
<p>======================<br />
locate .mysql_history<br />
======================</p>
]]></content:encoded>
			<wfw:commentRss>http://presoon.com/blog/2008/05/07/mysql-history-commands-typed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
