<?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>Apache, Linux ,Seo tricks and many more &#187; Mysql</title>
	<atom:link href="http://www.gossiplime.com/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gossiplime.com</link>
	<description>This blog is just for all persons to know more about php, apache , linux , seo etc</description>
	<lastBuildDate>Wed, 24 Jun 2009 15:50:03 +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>Copying a Table</title>
		<link>http://www.gossiplime.com/2009/03/copying-a-table/</link>
		<comments>http://www.gossiplime.com/2009/03/copying-a-table/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 21:21:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mysql]]></category>
		<category><![CDATA[mysql commands]]></category>

		<guid isPermaLink="false">http://www.gossiplime.com/?p=290</guid>
		<description><![CDATA[/*create a copy of a table so that you can alter it or experiment with it without endangering the original data */ CREATE TABLE new_table_name SELECT * FROM old_table_name; /* Differences: their names, if the old table had an index (or key), it does not transfer to the new table. only two columns chosen */]]></description>
			<content:encoded><![CDATA[<p>/*create a copy of a table so that you<br />
can alter it or experiment with it without endangering the original<br />
data<br />
*/</p>
<blockquote><p>CREATE TABLE new_table_name<br />
SELECT * FROM old_table_name;</p></blockquote>
<p>/* Differences: their names,<br />
               if the old table had an index (or key), it<br />
does not transfer to the new table.<br />
only two columns chosen<br />
*/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gossiplime.com/2009/03/copying-a-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Restart Mysql from ssh</title>
		<link>http://www.gossiplime.com/2009/02/restart-mysql-from-ssh/</link>
		<comments>http://www.gossiplime.com/2009/02/restart-mysql-from-ssh/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 11:13:12 +0000</pubDate>
		<dc:creator>sps</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.gossiplime.com/?p=265</guid>
		<description><![CDATA[To restart mysql service from command line (ssh) * Login to SSH as root using a program like putty. * Type the following command, /scripts/restartsrv_mysql Hope you all enjoy this command.]]></description>
			<content:encoded><![CDATA[<p>To restart mysql service from command line (ssh)</p>
<p>* Login to SSH as root using a program like putty.<br />
* Type the following command,</p>
<blockquote><p>/scripts/restartsrv_mysql</p></blockquote>
<p>Hope you all enjoy this command.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gossiplime.com/2009/02/restart-mysql-from-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable caching in MySQL</title>
		<link>http://www.gossiplime.com/2009/02/enable-caching-in-mysql/</link>
		<comments>http://www.gossiplime.com/2009/02/enable-caching-in-mysql/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 08:52:05 +0000</pubDate>
		<dc:creator>sps</dc:creator>
				<category><![CDATA[Mysql]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[mysql tuning]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[variable]]></category>

		<guid isPermaLink="false">http://www.gossiplime.com/?p=212</guid>
		<description><![CDATA[Log into your mysql $ mysql -u root –p Output: Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 16 to server version: 4.1.15-Debian_1-log Type &#8216;help;&#8217; or &#8216;\h&#8217; for help. Type &#8216;\c&#8217; to clear the buffer. mysql&#62; Now setup cache size 32Mb: mysql&#62; SET GLOBAL query_cache_size [...]]]></description>
			<content:encoded><![CDATA[<p>Log into your mysql</p>
<blockquote><p><code>$ mysql -u root –p</code></p></blockquote>
<p>Output:</p>
<blockquote><p>Enter password:</p>
<p>Welcome to the MySQL monitor.  Commands end with ; or \g.</p>
<p>Your MySQL connection id is 16 to server version: 4.1.15-Debian_1-log<br />
Type &#8216;help;&#8217; or &#8216;\h&#8217; for help. Type &#8216;\c&#8217; to clear the buffer.</p>
<p>mysql&gt;</p>
<pre>
Now setup cache size 32Mb:
mysql&gt; SET GLOBAL query_cache_size = 33554432;    

Query OK, 0 rows affected (0.00 sec)</pre>
</blockquote>
<pre>mysql&gt; SHOW VARIABLES LIKE 'query_cache_size';</pre>
<p>Output:</p>
<p>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;-+</p>
<p>| Variable_name    | Value    |</p>
<p>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;-+</p>
<p>| query_cache_size | 16777216 |</p>
<p>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;-+</p>
<blockquote><p>You can setup them in /etc/my.cnf (Red Hat) or /etc/mysql/my.cnf (Debian) file:<br />
<code># vi /etc/my.cnf</code><br />
Append config directives as follows:</p></blockquote>
<blockquote>
<pre>query_cache_size = 33554432
query_cache_type=1
query_cache_limit=2096576</pre>
</blockquote>
<pre></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.gossiplime.com/2009/02/enable-caching-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Restoring The Database via SSH</title>
		<link>http://www.gossiplime.com/2009/02/restoring-the-database-via-ssh/</link>
		<comments>http://www.gossiplime.com/2009/02/restoring-the-database-via-ssh/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 22:33:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mysql]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Database Access]]></category>
		<category><![CDATA[restore backup]]></category>

		<guid isPermaLink="false">http://www.gossiplime.com/?p=203</guid>
		<description><![CDATA[Restoring The Database via SSH Login with ssh on your hosting server. then goto mysql mysql -u dbusername -p databasename &#60; backupname.sql dbusername =&#62; Your database user name databasename =&#62; Your Database name backupname.sql (with full path where your sql file present) then hit enter it will ask your password of database then click enter [...]]]></description>
			<content:encoded><![CDATA[<h3>Restoring The Database via SSH</h3>
<p>Login with ssh on your hosting server.</p>
<p>then goto mysql</p>
<blockquote><p><span class="Mtype">mysql -u <strong>dbusername</strong> -p <strong>databasename</strong> &lt; backupname.sql</span></p></blockquote>
<ul>
<li><span class="Mtype">dbusername =&gt; Your database user name</span></li>
<li><span class="Mtype">databasename =&gt; Your Database name</span></li>
<li><span class="Mtype">backupname.sql (with full path where your sql file present)</span></li>
<li><span class="Mtype">then hit enter</span></li>
<li><span class="Mtype">it will ask your password of database</span></li>
<li><span class="Mtype">then click enter</span></li>
</ul>
<blockquote><p>If your hosting company has you on a remote MySQL server, such as mysql.yourhost.com, you will need to add the servername to the command line. The servername will be the same as in your config.php. The command line will be:</p>
<p><span class="Mtype">mysql -h <strong>servername</strong> -u <strong>dbusername</strong> -p <strong>databasename</strong> &lt; backupname.sql</span></p>
<p>Or:</p>
<p><span class="Mtype">mysql -h <strong>servername</strong> -u <strong>dbusername</strong> -p <strong>databasename</strong> &lt; /path/to/backupname.sql</span></p></blockquote>
<p><span class="Mtype">Now you guys have any difficulty post your comments here <img src='http://www.gossiplime.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gossiplime.com/2009/02/restoring-the-database-via-ssh/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Change MySQL data default directory</title>
		<link>http://www.gossiplime.com/2008/10/change-mysql-data-default-directory/</link>
		<comments>http://www.gossiplime.com/2008/10/change-mysql-data-default-directory/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 00:32:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mysql]]></category>

		<guid isPermaLink="false">http://www.gossiplime.com/?p=57</guid>
		<description><![CDATA[MySQL is a widely used and fast SQL database server. It is a client/server implementation that consists of a server daemon (mysqld) and many different client programs/libraries. If you want to install Mysql Database Server in Ubuntu check this tutorial. What is Mysql Data Directory? Mysql data directory is important part where all the mysql [...]]]></description>
			<content:encoded><![CDATA[<p>MySQL is a widely used and fast SQL database server. It is a client/server implementation that consists of a server daemon (mysqld) and many different client programs/libraries.</p>
<p>If you want to install Mysql <strong><span style="color: #339966;">Database Server</span></strong> in Ubuntu check <a href="http://www.ubuntugeek.com/howto-install-mysql-database-server-with-phpmyadmin-frontend.html" target="_blank">this</a> tutorial.</p>
<p><strong>What is Mysql Data Directory?</strong></p>
<p>Mysql data directory is important part where all the mysql <strong><span style="color: #339966;">Databases </span>s</strong>torage location.By default MySQL data default directory located in /var/lib/mysql.If you are running out of space in /var partition you need to move this to some other location.</p>
<p>Note:- This is only for advanced users and before moving default directory make a backup of your mysal databases.</p>
<p><strong>Procedure to follow</strong></p>
<p>Open the terminal</p>
<p>First you need to Stop <strong><span style="color: #339966;">MySql </span></strong>using the following command</p>
<blockquote><p>sudo /etc/init.d/mysql stop</p></blockquote>
<p>Now Copy the existing data directory (default located in /var/lib/mysql) using the following command</p>
<blockquote><p>sudo cp -R -p /var/lib/mysql /path/to/new/datadir</p></blockquote>
<p>All you need are the data files, so delete the others with the command</p>
<blockquote><p>sudo rm /path/to/new/datadir</p></blockquote>
<p>Note:- You will get a message about not being able to delete some directories, but that’s what you want.</p>
<p>Now edit the MySQL configuration file with the following command</p>
<blockquote><p>gksu gedit /etc/mysql/my.cnf</p></blockquote>
<p>Look for the entry for “datadir”, and change the path (which should be “/var/lib/mysql”) to the new data directory.</p>
<p>Important Note:-From Ubuntu 7.10 (Gutsy Gibbon) forward, Ubuntu uses some security software called AppArmor that specifies the areas of your filesystem applications are allowed to access. Unless you modify the AppArmor profile for MySQL, you’ll never be able to restart MySQL with the new datadir location.</p>
<p>In the terminal, enter the command</p>
<blockquote><p>sudo gedit /etc/apparmor.d/usr.sbin.mysqld</p></blockquote>
<p>Copy the lines beginning with “/var/lib/mysql”, comment out the originals with hash marks (”#”), and paste the lines below the originals.</p>
<p>Now change “/var/lib/mysql” in the two new lines with “/path/to/new/datadir”. Save and close the file.</p>
<p>Restart the AppArmor profiles with the command</p>
<blockquote><p>sudo /etc/init.d/apparmor reload</p></blockquote>
<p>Restart MySQL with the command</p>
<blockquote><p>sudo /etc/init.d/mysql restart</p></blockquote>
<p>Now MySQL should start with no errors, and your data will be stored in the new data directory location.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gossiplime.com/2008/10/change-mysql-data-default-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Mysql Database Server with Phpmyadmin Frontend</title>
		<link>http://www.gossiplime.com/2008/10/install-mysql-database-server-with-phpmyadmin-frontend/</link>
		<comments>http://www.gossiplime.com/2008/10/install-mysql-database-server-with-phpmyadmin-frontend/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 23:46:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mysql]]></category>
		<category><![CDATA[phpmyadmin]]></category>

		<guid isPermaLink="false">http://www.gossiplime.com/?p=58</guid>
		<description><![CDATA[MySQL is a widely used and fast SQL database server. It is a client/server implementation that consists of a server daemon (mysqld) and many different client programs/libraries. Installing Mysql database in Ubuntu sudo aptitude install mysql-server mysql-client libmysqlclient15-dev This will complete the installation of mysql server 5.0.45 in ubuntu gutsy. Configuring Mysql in ubuntu MySQL [...]]]></description>
			<content:encoded><![CDATA[<p>MySQL is a widely used and fast SQL database server. It is a client/server implementation that consists of a server daemon (mysqld) and many different client programs/libraries.</p>
<p><strong>Installing Mysql database in Ubuntu</strong></p>
<p>sudo aptitude install mysql-server mysql-client libmysqlclient15-dev</p>
<p>This will complete the installation of mysql server 5.0.45 in ubuntu gutsy.<br />
<strong><br />
Configuring Mysql in ubuntu</strong></p>
<p>MySQL initially only allows connections from the localhost (127.0.0.1). We’ll need to remove that restriction if you wish to make it accessible to everyone on the internet. Open the file /etc/mysql/my.cnf</p>
<p>sudo gedit /etc/mysql/my.cnf</p>
<p>Find the line bind-address = 127.0.0.1 and comment it out<br />
…<br />
#bind-address = 127.0.0.1<br />
…</p>
<p>You can check your configuration using the following command</p>
<p>#netstat -tap</p>
<p>Output Looks like below</p>
<p>tcp 0 0 *:mysql *:* LISTEN 4997/mysqld</p>
<p>MySQL comes with no root password as default. This is a huge security risk. You’ll need to set one. So that the local computer gets root access as well, you’ll need to set a password for that too. The local-machine-name is the name of the computer you’re working on. For more information see here</p>
<p>sudo mysqladmin -u root password your-new-password</p>
<p>sudo mysqladmin -h root@local-machine-name -u root -p password your-new-password</p>
<p>sudo /etc/init.d/mysql restart</p>
<p><strong>Manage Mysql using Phpmyadmin</strong></p>
<p>phpMyAdmin is a tool written in PHP intended to handle the administration of MySQL over the Web. Currently it can create and drop databases, create/drop/alter tables, delete/edit/add fields, execute any SQL statement, manage keys on fields, manage privileges,export data into various formats and is available in 54 languages. GPL License information.</p>
<p><strong>Install phpmyadmin in ubuntu</strong></p>
<p>sudo aptitude install phpmyadmin</p>
<p>This will complete the installation.</p>
<p>Now you need to goto http://serverip/phpmyadmin/</p>
<p>Login using your mysql root as username and password</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gossiplime.com/2008/10/install-mysql-database-server-with-phpmyadmin-frontend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQLTuner &#8211; High-performance MySQL tuning script</title>
		<link>http://www.gossiplime.com/2008/10/mysqltuner-high-performance-mysql-tuning-script/</link>
		<comments>http://www.gossiplime.com/2008/10/mysqltuner-high-performance-mysql-tuning-script/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 22:09:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mysql]]></category>
		<category><![CDATA[tune]]></category>

		<guid isPermaLink="false">http://www.gossiplime.com/?p=69</guid>
		<description><![CDATA[MySQLTuner is a script written in Perl that will assist you with your MySql configuration and make recommendations for increased performance and stability. Within seconds, it will display statistics about your MySQL installation and the areas where it can be improved. It’s key to remember that MySQLTuner is a script which can assist you with [...]]]></description>
			<content:encoded><![CDATA[<p>MySQLTuner is a script written in Perl that will assist you with your MySql configuration and make recommendations for increased performance and stability. Within seconds, it will display statistics about your MySQL installation and the areas where it can be improved.</p>
<p>It’s key to remember that MySQLTuner is a script which can assist you with your server, but it is not the solution to a badly performing MySQL server. The best performance gains come from a thorough review of the queries sent to the server, and an evaluation of the MySQL server itself. A qualified developer in your application’s programming or scripting language should be able to work with a MySql Databasesadministrator to find improvements for your server. Once the server and application are optimized well, you may need to consider hardware upgrades to the physical server itself.</p>
<p>This is a really useful tool for helping to optimize MySQL performance.Understanding the various my.cnf variables and how they affect performance can seem really complicated but this tool takes some of the pain away and makes it easier to understand the effects of each variable.It is especially useful to be able to see the global memory usage,  memory usage per thread and the maximum possible memory usage &#8211; that is really valuable information that is otherwise complex to calculate.</p>
<p><strong>MySQLTuner Features</strong></p>
<p>* Memory Usage: Calculates MySQL memory usage at max load and makes recommendations for  increasing or decreasing the MySQL memory footprint. Per-thread and server-wide buffer data is calculated<br />
separately for an accurate snapshot of the server&#8217;s configuration.<br />
* Slow Queries: Reviews the amount of slow queries relative to the total queries. Slow query time limits are also analyzed and recommendations are made.<br />
* Connections: Current and historical connection counts are reviewed.<br />
* Key Buffer: Takes configuration data and compares it to the actual indexes found in MyISAM tables. Key cache hit rates are calculated and variable adjustments are suggested.<br />
* Query Cache: Query cache hit rates and usage percentages are used to make recommendations for the query cache configuration variables.<br />
* Sorting &amp; Joins: Per-thread buffers that affect sorts and joins are reviewed along with the statistics from the queries run against the server.<br />
* Temporary Tables: Variable recommendations are made to reduce temporary tables that are written to the disk.<br />
* Table Cache: Compares total tables opened to the currently open tables. Calculates the table cache hit rate in order to make suggestions.<br />
* Open Files: Determines if the server will approach or run into the open file limit set by the operating system or the MySQL server itself.<br />
* Table Locks: Finds table locking that forces queries to wait and makes suggestions for reducing locks that require a wait.<br />
* Thread Cache: Calculates how many times MySQL must create a new thread to respond to a query.<br />
* Aborted Connections: Finds applications that are not closing connections to MySQL properly.<br />
* Read/Write Ratios: Calculates the percentage of read and write operations on your MySQL installation.</p>
<p><strong>Install Mysqltuner in Ubuntu Intrepid</strong></p>
<blockquote><p>sudo aptitude install mysqltuner</p></blockquote>
<p>Or using the following method</p>
<p><strong>Run MySQLTuner in Ubuntu</strong></p>
<p>Download MySQLTuner using the following command</p>
<blockquote><p>wget http://mysqltuner.com/mysqltuner.pl</p></blockquote>
<p>To run the script, simply make it executable and run it:</p>
<blockquote><p>chmod +x mysqltuner.pl</p>
<p>sudo ./mysqltuner.pl</p></blockquote>
<p>Enter your administrative username and password</p>
<p>You need to check mainly recommendations section at the end. It shows which variables you should adjust in the  section of your my.cnf (on Ubuntu file located at /etc/mysql/my.cnf).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gossiplime.com/2008/10/mysqltuner-high-performance-mysql-tuning-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
