<?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>Wordpress API &#187; MySql</title>
	<atom:link href="http://wordpressapi.com/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://wordpressapi.com</link>
	<description>Wordpress Tutorials, Tips, Code, Hacks, Themes, plugin, Developer Code book -Wordpress Code, Themes, Plugins, Tips, Tutorials, News, Releases, Designs, Hacks, Tricks, Blog</description>
	<lastBuildDate>Wed, 25 Jan 2012 18:48:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Solved issue: Can&#8217;t connect to local MySQL server through socket &#8216;/var/lib/mysql/mysql.sock</title>
		<link>http://wordpressapi.com/2011/03/10/solved-issue-connect-local-mysql-server-socket-varlibmysqlmysql-sock/</link>
		<comments>http://wordpressapi.com/2011/03/10/solved-issue-connect-local-mysql-server-socket-varlibmysqlmysql-sock/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 15:33:43 +0000</pubDate>
		<dc:creator>Wordpress API</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySql]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[local mysql server through socket]]></category>
		<category><![CDATA[mysql directory]]></category>
		<category><![CDATA[mysql server through socket]]></category>
		<category><![CDATA[mysqld]]></category>
		<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://wordpressapi.com/?p=6027</guid>
		<description><![CDATA[http://wordpressapi.com/2011/03/10/solved-issue-connect-local-mysql-server-socket-varlibmysqlmysql-sock/One day I faced issue with mysql.sock file. I solved the issue with following commands. [root@localhost ~]# mysqladmin -u root shutdown mysqladmin: connect to server at &#8216;localhost&#8217; failed error: &#8216;Can&#8217;t connect to local MySQL server through socket &#8216;/var/lib/mysql/mysql.sock&#8217; (2)&#8217; Check &#8230; Continue reading &#8594;]]></description>
			<content:encoded><![CDATA[http://wordpressapi.com/2011/03/10/solved-issue-connect-local-mysql-server-socket-varlibmysqlmysql-sock/<p>One day I faced issue with mysql.sock file. I solved the issue with following commands.</p>
<p>[root@localhost ~]# mysqladmin -u root shutdown<br />
mysqladmin: connect to server at &#8216;localhost&#8217; failed<br />
error: &#8216;Can&#8217;t connect to local MySQL server through socket &#8216;/var/lib/mysql/mysql.sock&#8217; (2)&#8217;<br />
Check that mysqld is running and that the socket: &#8216;/var/lib/mysql/mysql.sock&#8217; exists!</p>
<p>Using following command I checked the mysql directory.<br />
[root@localhost ~]# ll /var/lib/mysql/</p>
<p>I did not found the mysql.sock file there.</p>
<p>[root@localhost ~]# cd /var/lib/mysql/<br />
Created file in that location.<br />
[root@localhost mysql]# touch mysql.sock<br />
Gave the executabe permission the sock file.<br />
[root@localhost mysql]# chmod +x mysql.sock<br />
Changed the permission to mysql user<br />
[root@localhost mysql]# chown mysql:mysql -R *</p>
<p>After that restarted the machine<br />
[root@localhost mysql]# /etc/init.d/mysqld start<br />
Starting mysqld:                                           [  OK  ]<br />
[root@localhost mysql]# mysql -uroot<br />
Welcome to the MySQL monitor.  Commands end with ; or \g.<br />
Your MySQL connection id is 2<br />
Server version: 5.1.52 MySQL Community Server (GPL) by Remi</p>
<p>Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.<br />
This software comes with ABSOLUTELY NO WARRANTY. This is free software,<br />
and you are welcome to modify and redistribute it under the GPL v2 license</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; show databases;</p>
<p><a rel="attachment wp-att-6537" href="http://wordpressapi.com/2011/03/10/solved-issue-connect-local-mysql-server-socket-varlibmysqlmysql-sock/solved-issue-can-t-connect-to-local-mysql-server-through-socket/"><img class="alignnone size-full wp-image-6537" title="Solved issue- Can-t connect to local MySQL server through socket" src="http://images.wordpressapi.com/Solved-issue-Can-t-connect-to-local-MySQL-server-through-socket.png" alt="" width="250" height="166" /></a></p>
<h4>Incoming search terms:</h4><ul><li><a href="http://wordpressapi.com/2011/03/10/solved-issue-connect-local-mysql-server-socket-varlibmysqlmysql-sock/" title="c - google connect through socket">c - google connect through socket</a></li><li><a href="http://wordpressapi.com/2011/03/10/solved-issue-connect-local-mysql-server-socket-varlibmysqlmysql-sock/" title="Check that mysqld is running and that the socket: /var/lib/mysql/mysql sock exists!">Check that mysqld is running and that the socket: /var/lib/mysql/mysql sock exists!</a></li><li><a href="http://wordpressapi.com/2011/03/10/solved-issue-connect-local-mysql-server-socket-varlibmysqlmysql-sock/" title="mysqladmin connect to server at \localhost\ failed ec2">mysqladmin connect to server at \localhost\ failed ec2</a></li><li><a href="http://wordpressapi.com/2011/03/10/solved-issue-connect-local-mysql-server-socket-varlibmysqlmysql-sock/" title="oracle sock file">oracle sock file</a></li><li><a href="http://wordpressapi.com/2011/03/10/solved-issue-connect-local-mysql-server-socket-varlibmysqlmysql-sock/" title="touch mysql sock">touch mysql sock</a></li><li><a href="http://wordpressapi.com/2011/03/10/solved-issue-connect-local-mysql-server-socket-varlibmysqlmysql-sock/" title="wordpress widgets can not connect to mysql sock">wordpress widgets can not connect to mysql sock</a></li></ul><p>Follow us on Twitter <a href="http://twitter.com/wordpressapi">WordPress API</a></p>]]></content:encoded>
			<wfw:commentRss>http://wordpressapi.com/2011/03/10/solved-issue-connect-local-mysql-server-socket-varlibmysqlmysql-sock/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to create mysql user and grant all permission</title>
		<link>http://wordpressapi.com/2011/03/02/create-mysql-user-grant-permission/</link>
		<comments>http://wordpressapi.com/2011/03/02/create-mysql-user-grant-permission/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 05:43:46 +0000</pubDate>
		<dc:creator>Wordpress API</dc:creator>
				<category><![CDATA[MySql]]></category>
		<category><![CDATA[GRANT ALL]]></category>
		<category><![CDATA[localhost]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[permission]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[root user]]></category>
		<category><![CDATA[user]]></category>
		<category><![CDATA[wordpressapi]]></category>

		<guid isPermaLink="false">http://wordpressapi.com/?p=6140</guid>
		<description><![CDATA[http://wordpressapi.com/2011/03/02/create-mysql-user-grant-permission/When we do the fresh installation of Mysql we got the root user without any password. Keeping and using the root user for application is not safe. For creating new user use the following commands. Follow us on Twitter WordPress &#8230; Continue reading &#8594;]]></description>
			<content:encoded><![CDATA[http://wordpressapi.com/2011/03/02/create-mysql-user-grant-permission/<p>When we do the fresh installation of Mysql we got the root user without any password. Keeping and using the root user for application is not safe.</p>
<p><a rel="attachment wp-att-6546" href="http://wordpressapi.com/2011/03/02/create-mysql-user-grant-permission/how-to-create-mysql-user-and-grant-all-permission/"><img class="alignnone size-full wp-image-6546" title="How to create mysql user and grant all permission" src="http://images.wordpressapi.com/How-to-create-mysql-user-and-grant-all-permission.png" alt="" width="250" height="250" /></a></p>
<p>For creating new user use the following commands.</p>
<pre class="brush: php; title: ; notranslate">
CREATE USER 'wordpressapi'@'localhost' IDENTIFIED BY 'Test@123456';
GRANT ALL ON *.* TO 'wordpressapi'@'localhost';
</pre>
<p>Follow us on Twitter <a href="http://twitter.com/wordpressapi">WordPress API</a></p>]]></content:encoded>
			<wfw:commentRss>http://wordpressapi.com/2011/03/02/create-mysql-user-grant-permission/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Solved issue: Can&#8217;t connect to local MySQL server through socket &#8216;/var/lib/mysql/mysql.sock</title>
		<link>http://wordpressapi.com/2011/02/03/solved-issue-connect-local-mysql-server-socket-varlibmysqlmysql-sock-2/</link>
		<comments>http://wordpressapi.com/2011/02/03/solved-issue-connect-local-mysql-server-socket-varlibmysqlmysql-sock-2/#comments</comments>
		<pubDate>Thu, 03 Feb 2011 17:33:22 +0000</pubDate>
		<dc:creator>Wordpress API</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySql]]></category>

		<guid isPermaLink="false">http://wordpressapi.com/?p=5969</guid>
		<description><![CDATA[http://wordpressapi.com/2011/02/03/solved-issue-connect-local-mysql-server-socket-varlibmysqlmysql-sock-2/[root@localhost ~]# mysqladmin -u root shutdown mysqladmin: connect to server at &#8216;localhost&#8217; failed error: &#8216;Can&#8217;t connect to local MySQL server through socket &#8216;/var/lib/mysql/mysql.sock&#8217; (2)&#8217; Check that mysqld is running and that the socket: &#8216;/var/lib/mysql/mysql.sock&#8217; exists! Using following command I checked &#8230; Continue reading &#8594;]]></description>
			<content:encoded><![CDATA[http://wordpressapi.com/2011/02/03/solved-issue-connect-local-mysql-server-socket-varlibmysqlmysql-sock-2/<p>[root@localhost ~]# mysqladmin -u root shutdown<br />
mysqladmin: connect to server at &#8216;localhost&#8217; failed<br />
error: &#8216;Can&#8217;t connect to local MySQL server through socket &#8216;/var/lib/mysql/mysql.sock&#8217; (2)&#8217;<br />
Check that mysqld is running and that the socket: &#8216;/var/lib/mysql/mysql.sock&#8217; exists!</p>
<p>Using following command I checked the mysql directory.<br />
[root@localhost ~]# ll /var/lib/mysql/</p>
<p>I did not found the mysql.sock file there.</p>
<p>[root@localhost ~]# cd /var/lib/mysql/<br />
Created file in that location.<br />
[root@localhost mysql]# touch mysql.sock<br />
Gave the executabe permission the sock file.<br />
[root@localhost mysql]# chmod +x mysql.sock<br />
Changed the permission to mysql user<br />
[root@localhost mysql]# chown mysql:mysql -R *</p>
<p>After that restarted the machine<br />
[root@localhost mysql]# /etc/init.d/mysqld start<br />
Starting mysqld:                                           [  OK  ]<br />
[root@localhost mysql]# mysql -uroot<br />
Welcome to the MySQL monitor.  Commands end with ; or \g.<br />
Your MySQL connection id is 2<br />
Server version: 5.1.52 MySQL Community Server (GPL) by Remi</p>
<p>Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.<br />
This software comes with ABSOLUTELY NO WARRANTY. This is free software,<br />
and you are welcome to modify and redistribute it under the GPL v2 license</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; show databases;</p>
<p><a rel="attachment wp-att-6553" href="http://wordpressapi.com/2011/02/03/solved-issue-connect-local-mysql-server-socket-varlibmysqlmysql-sock-2/solved-issue-can-t-connect-to-local-mysql-server-through-socket-2/"><img class="alignnone size-full wp-image-6553" title="Solved issue-Can-t connect to local MySQL server through socket" src="http://images.wordpressapi.com/Solved-issue-Can-t-connect-to-local-MySQL-server-through-socket1.png" alt="" width="200" height="200" /></a></p>
<h4>Incoming search terms:</h4><ul><li><a href="http://wordpressapi.com/2011/02/03/solved-issue-connect-local-mysql-server-socket-varlibmysqlmysql-sock-2/" title="cant connect to local mysql server through socket /var/lib/mysql/mysql sock (2)">cant connect to local mysql server through socket /var/lib/mysql/mysql sock (2)</a></li><li><a href="http://wordpressapi.com/2011/02/03/solved-issue-connect-local-mysql-server-socket-varlibmysqlmysql-sock-2/" title="check that mysqld is running and that the socket: \/var/lib/mysql/mysql sock\ exists!">check that mysqld is running and that the socket: \/var/lib/mysql/mysql sock\ exists!</a></li><li><a href="http://wordpressapi.com/2011/02/03/solved-issue-connect-local-mysql-server-socket-varlibmysqlmysql-sock-2/" title="centos Cannot connect to MySQL server on localhost">centos Cannot connect to MySQL server on localhost</a></li><li><a href="http://wordpressapi.com/2011/02/03/solved-issue-connect-local-mysql-server-socket-varlibmysqlmysql-sock-2/" title="Cant connect to local MySQL server through socket /var/lib/mysql/mysql sock">Cant connect to local MySQL server through socket /var/lib/mysql/mysql sock</a></li><li><a href="http://wordpressapi.com/2011/02/03/solved-issue-connect-local-mysql-server-socket-varlibmysqlmysql-sock-2/" title="/var/lib/mysql/mysql sock">/var/lib/mysql/mysql sock</a></li><li><a href="http://wordpressapi.com/2011/02/03/solved-issue-connect-local-mysql-server-socket-varlibmysqlmysql-sock-2/" title="Cant connect to local MySQL server through socket /var/lib/mysql/mysql sock meaning">Cant connect to local MySQL server through socket /var/lib/mysql/mysql sock meaning</a></li><li><a href="http://wordpressapi.com/2011/02/03/solved-issue-connect-local-mysql-server-socket-varlibmysqlmysql-sock-2/" title="can\t connect to local mysql server through socket \/var/lib/mysql/mysql sock\ (2)">can\t connect to local mysql server through socket \/var/lib/mysql/mysql sock\ (2)</a></li><li><a href="http://wordpressapi.com/2011/02/03/solved-issue-connect-local-mysql-server-socket-varlibmysqlmysql-sock-2/" title="define Cant connect to local MySQL server through socket /var/lib/mysql/mysql sock (2)">define Cant connect to local MySQL server through socket /var/lib/mysql/mysql sock (2)</a></li></ul><p>Follow us on Twitter <a href="http://twitter.com/wordpressapi">WordPress API</a></p>]]></content:encoded>
			<wfw:commentRss>http://wordpressapi.com/2011/02/03/solved-issue-connect-local-mysql-server-socket-varlibmysqlmysql-sock-2/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>How optimize the all tables using  php script</title>
		<link>http://wordpressapi.com/2010/12/01/optimize-tables-php-script/</link>
		<comments>http://wordpressapi.com/2010/12/01/optimize-tables-php-script/#comments</comments>
		<pubDate>Wed, 01 Dec 2010 15:45:00 +0000</pubDate>
		<dc:creator>Wordpress API</dc:creator>
				<category><![CDATA[MySql]]></category>
		<category><![CDATA[Open source]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://images.wordpressapi.com/?p=5491</guid>
		<description><![CDATA[http://wordpressapi.com/2010/12/01/optimize-tables-php-script/Optimizing tables is very necessary for database. That will improve the your website performance.  Optimize command is helpful to manage database files in right manner. This command will optimize the size of file size of database files. If you want &#8230; Continue reading &#8594;]]></description>
			<content:encoded><![CDATA[http://wordpressapi.com/2010/12/01/optimize-tables-php-script/<p>Optimizing tables is very necessary for database. That will improve the your website performance.  Optimize command is helpful to manage database files in right manner. This command will optimize the size of file size of database files.</p>
<p><img class="alignnone size-full wp-image-5494" title="php_mysql" src="http://images.wordpressapi.com/php_mysql.jpg" alt="" width="400" height="300" /></p>
<p>If you want to optimize the all tables of database then use following script.</p>
<pre class="brush: php; title: ; notranslate">

&lt;?php
$dbconnect = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$dbconnect) {
 die('Could not connect: ' . mysql_error());
}
echo 'Connected to database successfully';

mysql_select_db('YOUR_DATABASE',$dbconnect);

dbConnect();
$alltables = mysql_query(&quot;SHOW TABLES&quot;);

while ($table = mysql_fetch_assoc($alltables))
{
 foreach ($table as $db =&gt; $tablename)
 {
 mysql_query(&quot;OPTIMIZE TABLE '&quot;.$tablename.&quot;'&quot;)
 or die(mysql_error());
 }
}
echo 'All tables optimized successfully';

mysql_close($dbconnect);
?&gt;
</pre>
<p>The MySQL Optimize Table command will effectively de-fragment a mysql table and is very useful for tables which are frequently updated and/or deleted.</p>
<p>Follow us on Twitter <a href="http://twitter.com/wordpressapi">WordPress API</a></p>]]></content:encoded>
			<wfw:commentRss>http://wordpressapi.com/2010/12/01/optimize-tables-php-script/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>mysql sleep processes issue solved</title>
		<link>http://wordpressapi.com/2010/10/28/mysql-sleep-processes-issue-solved/</link>
		<comments>http://wordpressapi.com/2010/10/28/mysql-sleep-processes-issue-solved/#comments</comments>
		<pubDate>Thu, 28 Oct 2010 17:15:29 +0000</pubDate>
		<dc:creator>Wordpress API</dc:creator>
				<category><![CDATA[MySql]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://images.wordpressapi.com/?p=5327</guid>
		<description><![CDATA[http://wordpressapi.com/2010/10/28/mysql-sleep-processes-issue-solved/I faced the sleep query issue sometimes.  Many times that kills the server. When ever you are using dedicated virtual hosting server that time you need to me very careful how you are setting up the apache and mysql. I &#8230; Continue reading &#8594;]]></description>
			<content:encoded><![CDATA[http://wordpressapi.com/2010/10/28/mysql-sleep-processes-issue-solved/<p>I faced the sleep query issue sometimes.  Many times that kills the server. When ever you are using dedicated virtual hosting server that time you need to me very careful how you are setting up the apache and mysql.</p>
<p><img class="alignnone size-full wp-image-5330" title="mysql-sleep" src="http://images.wordpressapi.com/mysql-sleep.jpg" alt="" width="393" height="400" /></p>
<p>I found some major reasons for mysql sleep processes. Here I am giving some reasons:</p>
<p>1. apache requests increase<br />
2. mysql queries increase<br />
3. mysql slow queries increase<br />
4. apache connections start to wait on slow mysql queries<br />
5. apache connections take longer to close<br />
6. more apache connections are opened<br />
7. with each apache request a new sleeping mysql connection is made<br />
8. mysql &amp; apache reach max_connections<br />
9. server slows to a crawl</p>
<p>Using linux top command you can check the load average and which process is taking so much memory of your server. If you saw mysqld is taking much memory of server then you should check using following mysql commands:</p>
<p>&gt; show full processlist;</p>
<p>using this command you can check the mysql processes. Which sql queries being fired on mysql server. If you found so much sleep processes then you should check your mysql variables and settings. If so much mysql queries being fired on specific table then you should change the table storage engine type.</p>
<p>Using following command you can change the storage engine type.<br />
&gt; ALTER TABLE tablename ENGINE = MYISAM;</p>
<p>MYISAM storage engine type is faster then inodb. you can create the mediator tables also for big size table to handing a load of table.</p>
<p>Then major change for solving the issue of sleep processes is, you should change the wait_timeout variable. Default value is 2800 seconds.</p>
<p>mysql&gt; show variables;</p>
<p>you can change the setting using following  mysql command. Best value is 60 second need to be set for wait timeout.<br />
mysql&gt; show variables like &#8216;wait_timeout&#8217;;</p>
<p>mysql&gt; set global wait_timeout=60;</p>
<p>mysql&gt;show variables like &#8216;wait_timeout&#8217;;</p>
<p>After doing above changes you can check the mysql processlist. If you are still facing issues with mysql then please write to me.</p>
<h4>Incoming search terms:</h4><ul><li><a href="http://wordpressapi.com/2010/10/28/mysql-sleep-processes-issue-solved/" title="mysql sleeping connections">mysql sleeping connections</a></li><li><a href="http://wordpressapi.com/2010/10/28/mysql-sleep-processes-issue-solved/" title="mysql sleep processes">mysql sleep processes</a></li><li><a href="http://wordpressapi.com/2010/10/28/mysql-sleep-processes-issue-solved/" title="find mysql sleep process">find mysql sleep process</a></li><li><a href="http://wordpressapi.com/2010/10/28/mysql-sleep-processes-issue-solved/" title="drupal mysql sleep">drupal mysql sleep</a></li><li><a href="http://wordpressapi.com/2010/10/28/mysql-sleep-processes-issue-solved/" title="mysql sleep process">mysql sleep process</a></li><li><a href="http://wordpressapi.com/2010/10/28/mysql-sleep-processes-issue-solved/" title="apache sleeping processes">apache sleeping processes</a></li><li><a href="http://wordpressapi.com/2010/10/28/mysql-sleep-processes-issue-solved/" title="wordpress cache mysql sleep query">wordpress cache mysql sleep query</a></li><li><a href="http://wordpressapi.com/2010/10/28/mysql-sleep-processes-issue-solved/" title="mysql sleep slow query">mysql sleep slow query</a></li><li><a href="http://wordpressapi.com/2010/10/28/mysql-sleep-processes-issue-solved/" title="wordpress mysql sleep">wordpress mysql sleep</a></li><li><a href="http://wordpressapi.com/2010/10/28/mysql-sleep-processes-issue-solved/" title="mysql sleeping queries increases fast">mysql sleeping queries increases fast</a></li><li><a href="http://wordpressapi.com/2010/10/28/mysql-sleep-processes-issue-solved/" title="mysql wait_timeout sleep myisam">mysql wait_timeout sleep myisam</a></li><li><a href="http://wordpressapi.com/2010/10/28/mysql-sleep-processes-issue-solved/" title="php mysql sleep processes">php mysql sleep processes</a></li><li><a href="http://wordpressapi.com/2010/10/28/mysql-sleep-processes-issue-solved/" title="processlist mysql wordpress">processlist mysql wordpress</a></li><li><a href="http://wordpressapi.com/2010/10/28/mysql-sleep-processes-issue-solved/" title="sleeping mysql processes">sleeping mysql processes</a></li><li><a href="http://wordpressapi.com/2010/10/28/mysql-sleep-processes-issue-solved/" title="wordpress apache sleeping process">wordpress apache sleeping process</a></li><li><a href="http://wordpressapi.com/2010/10/28/mysql-sleep-processes-issue-solved/" title="wordpress mysql command sleep">wordpress mysql command sleep</a></li><li><a href="http://wordpressapi.com/2010/10/28/mysql-sleep-processes-issue-solved/" title="windows mysql sleep process">windows mysql sleep process</a></li><li><a href="http://wordpressapi.com/2010/10/28/mysql-sleep-processes-issue-solved/" title="apache mysql sleep requests">apache mysql sleep requests</a></li><li><a href="http://wordpressapi.com/2010/10/28/mysql-sleep-processes-issue-solved/" title="apache server status waiting for connection and mysql sleep processes">apache server status waiting for connection and mysql sleep processes</a></li><li><a href="http://wordpressapi.com/2010/10/28/mysql-sleep-processes-issue-solved/" title="clear processes my sql command sleep">clear processes my sql command sleep</a></li></ul><p>Follow us on Twitter <a href="http://twitter.com/wordpressapi">WordPress API</a></p>]]></content:encoded>
			<wfw:commentRss>http://wordpressapi.com/2010/10/28/mysql-sleep-processes-issue-solved/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How to check the mysql logs for select queries</title>
		<link>http://wordpressapi.com/2010/10/26/check-mysql-logs-select-queries/</link>
		<comments>http://wordpressapi.com/2010/10/26/check-mysql-logs-select-queries/#comments</comments>
		<pubDate>Tue, 26 Oct 2010 17:05:56 +0000</pubDate>
		<dc:creator>Wordpress API</dc:creator>
				<category><![CDATA[MySql]]></category>
		<category><![CDATA[Open source]]></category>

		<guid isPermaLink="false">http://images.wordpressapi.com/?p=5320</guid>
		<description><![CDATA[http://wordpressapi.com/2010/10/26/check-mysql-logs-select-queries/As a developers need to check the mysql logs. Many times for any request how many mysql queries are running or executed we need to know. In this tutorial I will show you how to created mysql log file for &#8230; Continue reading &#8594;]]></description>
			<content:encoded><![CDATA[http://wordpressapi.com/2010/10/26/check-mysql-logs-select-queries/<p>As a developers need to check the mysql logs. Many times for any request how many mysql queries are running or executed we need to know.</p>
<p><img class="alignnone size-full wp-image-5324" title="mysql-binary-log" src="http://images.wordpressapi.com/mysql-binary-log.jpg" alt="" width="449" height="302" /></p>
<p>In this tutorial I will show you how to created mysql log file for checking the SELECT, UPDATE, DELETE or any types of mysql queries.</p>
<p>If you are using the linux then use the my.cnf file which will be located in etc folder. If you are using the windows then use the my.ini file. That file you will find in following location in case of wamp server.</p>
<p>c:\wamp\bin\mysql\mysql5.0.45\my.ini</p>
<p>I am using the Linux so here I am giving that example.  use following command.</p>
<p>[root@siwank-pc mysql]# mkdir /var/log/mysql<br />
[root@siwank-pc mysql]# chown mysql:mysql /var/log/mysql</p>
<p>[root@siwank-pc mysql]# vim /etc/my.cnf</p>
<p>[mysqld]<br />
log = /var/log/mysql/mysqld.log //This log file will give you the full mysql access log</p>
<p>log-error=/var/log/mysql/mysqld-error.log // this log file will give you the error log of mysql</p>
<p>log-slow-queries=/var/log/mysql/log-slow-queries.log // this log file will give you the slow queries log</p>
<p>If you need the more information about mysql logs then write to me.</p>
<p>Follow us on Twitter <a href="http://twitter.com/wordpressapi">WordPress API</a></p>]]></content:encoded>
			<wfw:commentRss>http://wordpressapi.com/2010/10/26/check-mysql-logs-select-queries/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How to use mongodb with php</title>
		<link>http://wordpressapi.com/2010/09/09/how-to-use-the-mongodb-with-php/</link>
		<comments>http://wordpressapi.com/2010/09/09/how-to-use-the-mongodb-with-php/#comments</comments>
		<pubDate>Thu, 09 Sep 2010 10:36:02 +0000</pubDate>
		<dc:creator>Wordpress API</dc:creator>
				<category><![CDATA[MySql]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mongo]]></category>

		<guid isPermaLink="false">http://images.wordpressapi.com/?p=5265</guid>
		<description><![CDATA[http://wordpressapi.com/2010/09/09/how-to-use-the-mongodb-with-php/If you want to use the mongodb with php then you need to install pecl libraries. Mongo extension is not bundled with PHP. For installing the Mongo use following URL: If you dont have pecl installed on your linux machine &#8230; Continue reading &#8594;]]></description>
			<content:encoded><![CDATA[http://wordpressapi.com/2010/09/09/how-to-use-the-mongodb-with-php/<p><img class="alignnone size-full wp-image-5266" title="mongodb-and-php" src="http://images.wordpressapi.com/mongodb-and-php.jpg" alt="" width="493" height="227" /></p>
<p>If you want to use the mongodb with php then you need to install pecl libraries. Mongo extension is not bundled with PHP.<br />
For installing the Mongo use following URL:<br />
If you dont have pecl installed on your linux machine then use following command.<br />
# yum install php-pecl*<br />
then use following command<br />
# pecl install mongo<br />
Then open the php.ini file. if you are using the linux then use following command.<br />
# vim /etc/php.ini</p>
<pre class="brush: plain; title: ; notranslate">
## Add following lines, end of php.ini file ##
# MongoDB Driver
extension=mongo.so
</pre>
<p>Restart the apache webserver using following command<br />
# /etc/init.d/httpd restart<br />
If Mongodb server is running then use can test your mongodb database using following code:<br />
Create the mongotest.php file</p>
<pre class="brush: plain; title: ; notranslate">
&lt;?php
// connect
$m = new Mongo();
// select a database
$db = $m-&gt;wordpress;
$collection = $db-&gt;wordpressapi;
// add an element
$obj = array( &quot;title&quot; =&gt; &quot;Sony this Good.\n&quot;, &quot;author&quot; =&gt; &quot;Wordpressapi.com&quot; );
$collection-&gt;insert($obj);
// add another element, with a different &quot;shape&quot;
$obj = array( &quot;title&quot; =&gt; &quot;Wordpressapi.com&quot;, &quot;online&quot; =&gt; true );
$collection-&gt;insert($obj);
// find everything in the collection
$cursor = $collection-&gt;find();
// iterate through the results
foreach ($cursor as $obj) {
echo $obj[&quot;title&quot;] . &quot;\n&quot;;
echo $obj[&quot;author&quot;] . &quot;\n&quot;;
}
// disconnect
$m-&gt;close();
?&gt;
</pre>
<p>If you open this file in browser then you can see the following words in browser:<br />
Sony this Good. WordPressapi.com Sony this Good. WordPressapi.com<br />
If you want to use the mongodb with php then you need to install pecl libraries. Mongo extension is not bundled with PHP.<br />
For installing the Mongo use following URL:<br />
If you dont have pecl installed on your linux machine then use following command.# yum install php-pecl*<br />
then use following command# pecl install mongo<br />
Then open the php.ini file. if you are using the linux then use following command.<br />
# vim /etc/php.ini</p>
<pre class="brush: plain; title: ; notranslate">## Add following lines, end of php.ini file ### MongoDB Driverextension=mongo.so</pre>
<p>Restart the apache webserver using following command<br />
# /etc/init.d/httpd restart<br />
If Mongodb server is running then use can test your mongodb database using following code:<br />
Create the mongotest.php file</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
// connect$m = new Mongo();
// select a database$db = $m-&gt;wordpress;$collection = $db-&gt;wordpressapi;
// add an element$obj = array( &quot;title&quot; =&gt; &quot;Sony this Good.\n&quot;, &quot;author&quot; =&gt; &quot;Wordpressapi.com&quot; );$collection-&gt;insert($obj);
// add another element, with a different &quot;shape&quot;$obj = array( &quot;title&quot; =&gt; &quot;Wordpressapi.com&quot;, &quot;online&quot; =&gt; true );$collection-&gt;insert($obj);
// find everything in the collection$cursor = $collection-&gt;find();
// iterate through the resultsforeach ($cursor as $obj) {    echo $obj[&quot;title&quot;] . &quot;\n&quot;;     echo $obj[&quot;author&quot;] . &quot;\n&quot;;}
// disconnect$m-&gt;close();
?&gt;
</pre>
<p>If you open this file in browser then you can see the following words in browser:Sony this Good. WordPressapi.com Sony this Good. WordPressapi.com</p>
<h4>Incoming search terms:</h4><ul><li><a href="http://wordpressapi.com/2010/09/09/how-to-use-the-mongodb-with-php/" title="wordpress mongodb">wordpress mongodb</a></li></ul><p>Follow us on Twitter <a href="http://twitter.com/wordpressapi">WordPress API</a></p>]]></content:encoded>
			<wfw:commentRss>http://wordpressapi.com/2010/09/09/how-to-use-the-mongodb-with-php/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>How to install Mongodb on linux</title>
		<link>http://wordpressapi.com/2010/09/09/how-to-install-mongodb-on-linux/</link>
		<comments>http://wordpressapi.com/2010/09/09/how-to-install-mongodb-on-linux/#comments</comments>
		<pubDate>Thu, 09 Sep 2010 10:25:43 +0000</pubDate>
		<dc:creator>Wordpress API</dc:creator>
				<category><![CDATA[MySql]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[mongo]]></category>
		<category><![CDATA[mongodb]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Server]]></category>

		<guid isPermaLink="false">http://images.wordpressapi.com/?p=5261</guid>
		<description><![CDATA[http://wordpressapi.com/2010/09/09/how-to-install-mongodb-on-linux/Before installing the Mongodb on linux box you need to install following packages on box. For 32bit user use following command For 64bit use following command Mongo stores database in data/db folder. so we need to create those folder using &#8230; Continue reading &#8594;]]></description>
			<content:encoded><![CDATA[http://wordpressapi.com/2010/09/09/how-to-install-mongodb-on-linux/<p><img class="alignnone size-full wp-image-5262" title="Mongodb-database" src="http://images.wordpressapi.com/Mongodb-database.jpg" alt="" width="500" height="333" /></p>
<p>Before installing the Mongodb on linux box you need to install following packages on box.</p>
<pre class="brush: php; title: ; notranslate">
[root@sonyk-pc Download]# sudo yum -y install git tcsh scons gcc-c++ glibc-devel
[root@sonyk-pc Download]# sudo yum -y install boost-devel pcre-devel js-devel readline-devel
[root@sonyk-pc Download]# sudo yum -y install boost-devel-static readline-static ncurses-static
</pre>
<p>For 32bit user use following command</p>
<pre class="brush: php; title: ; notranslate">
[root@sonyk-pc Download]# wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.6.2.tgz
</pre>
<p>For 64bit use following command</p>
<pre class="brush: php; title: ; notranslate">
[root@sonyk-pc Download]# wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-1.6.2.tgz
[root@sonyk-pc Download]# tar xzf mongodb-linux-i686-1.6.2.tgz
[root@sonyk-pc Download]#  cd mongodb-linux-i686-1.6.2
</pre>
<p>Mongo stores database in data/db folder. so we need to create those folder using following command.</p>
<pre class="brush: php; title: ; notranslate">
[root@sonyk-pc mongodb-linux-i686-1.6.2]# sudo mkdir -p /data/db/
[root@sonyk-pc mongodb-linux-i686-1.6.2]# sudo chown `id -u` /data/db
</pre>
<pre class="brush: php; title: ; notranslate">
[root@sonyk-pc mongodb-linux-i686-1.6.2]# ./bin/mongod
./bin/mongod --help for help and startup options
Thu Sep  9 13:10:55 MongoDB starting : pid=22159 port=27017 dbpath=/data/db/ 32-bit
** NOTE: when using MongoDB 32 bit, you are limited to about 2 gigabytes of data
**       see http://blog.mongodb.org/post/137788967/32-bit-limitations
Thu Sep  9 13:10:55 db version v1.6.2, pdfile version 4.5
</pre>
<p>If you want to create mongodb service in linux then use following steps:</p>
<pre class="brush: php; title: ; notranslate">
[root@sonyk-pc Download]# wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.6.2.tgz
[root@sonyk-pc Download]# tar xzf http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.6.2.tgz
[root@sonyk-pc Download]# mv mongodb-linux-i686-1.6.2 /opt/mongodb
[root@sonyk-pc Download]# mkdir -p /srv/db/mongodb
[root@sonyk-pc Download]# touch /srv/db/mongodb.log
[root@sonyk-pc Download]# mkdir /opt/bin/
[root@sonyk-pc Download]# mkdir /opt/config/
</pre>
<p>create the File: /opt/bin/mongodb-stop<br />
Put following code in that file:</p>
<pre class="brush: plain; title: ; notranslate">
#!/bin/bash
pid=`ps -o pid,command ax | grep mongod | awk '!/awk/ &amp;&amp; !/grep/ {print $1}'`;
if [ &quot;${pid}&quot; != &quot;&quot; ]; then
kill -2 ${pid};
fi
</pre>
<p>create the File: /opt/bin/mongodb-start<br />
Put following code in that file:</p>
<pre class="brush: plain; title: ; notranslate">
#!/bin/sh
/opt/mongodb/bin/mongod --config /opt/config/mongodb \
## --upgrade \ ##runs a database upgrade option if needed \
</pre>
<p>File: /opt/config/mongodb<br />
Put following code in that file:</p>
<pre class="brush: plain; title: ; notranslate">
# Configuration Options for MongoDB
#
# For More Information, Consider:
# - Configuration Parameters: http://www.mongodb.org/display/DOCS/Command+Line+Parameters
# - File Based Configuration: http://www.mongodb.org/display/DOCS/File+Based+Configuration
dbpath = /srv/db/mongodb
logpath = /srv/db/mongodb.log
logappend = true
bind_ip = 127.0.0.1
port = 27017
fork = true
auth = true
# noauth = true
</pre>
<p>Do that file as linux executable<br />
chmod +x /opt/bin/mongodb-start<br />
chmod +x /opt/bin/mongodb-stop<br />
We&#8217;ve also created a very basic &#8220;init script&#8221; as a wrapper around the mongodb-start and mongo-stop scripts described above. You will still need to modify and manage the configuration of your MongoDB server in the files above. This script only provides a means for ensuring that MongoDB will start at boot. Issue the following commands:<br />
wget http://library.linode.com/databases/mongodb/reference/init-rpm.sh<br />
mv init-rpm.sh /etc/rc.d/init.d/mongodb<br />
chmod +x /etc/rc.d/init.d/mongodb /etc/init.d/mongodb<br />
chkconfig &#8211;add mongodb<br />
chkconfig &#8211;level 35 mongodb on<br />
You will also need to create a user and group for mongodb; issue the following command:</p>
<pre class="brush: plain; title: ; notranslate">
useradd -M -r --home-dir /opt/mongodb mongodb
</pre>
<p>Now issue the following command to ensure that the MongoDB user you just created will have access to all required files in the /srv/db/ hierarchy:<br />
chown mongodb:mongodb -R /srv/db/<br />
To start and stop MongoDB using the init script, issue the appropriate command from the following:<br />
/etc/init.d/mongodb start<br />
/etc/init.d/mongodb stop<br />
For checking the web admin interface of Mongodb &#8211; listening on port 28017<br />
Check this URL : http://localhost:28017/<br />
Before installing the Mongodb on linux box you need to install following packages on box.[root@sonyk-pc Download]# sudo yum -y install git tcsh scons gcc-c++ glibc-devel[root@sonyk-pc Download]# sudo yum -y install boost-devel pcre-devel js-devel readline-devel[root@sonyk-pc Download]# sudo yum -y install boost-devel-static readline-static ncurses-static</p>
<p>For 32bit user use following command[root@sonyk-pc Download]# wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.6.2.tgz<br />
For 64bit use following command[root@sonyk-pc Download]# wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-1.6.2.tgz</p>
<p>[root@sonyk-pc Download]# tar xzf mongodb-linux-i686-1.6.2.tgz [root@sonyk-pc Download]#  cd mongodb-linux-i686-1.6.2<br />
Mongo stores database in data/db folder. so we need to create those folder using following command.<br />
[root@sonyk-pc mongodb-linux-i686-1.6.2]# sudo mkdir -p /data/db/[root@sonyk-pc mongodb-linux-i686-1.6.2]# sudo chown `id -u` /data/db<br />
Using following command you can start the mongo database.<br />
[root@sonyk-pc mongodb-linux-i686-1.6.2]# ./bin/mongod./bin/mongod &#8211;help for help and startup optionsThu Sep  9 13:10:55 MongoDB starting : pid=22159 port=27017 dbpath=/data/db/ 32-bit<br />
** NOTE: when using MongoDB 32 bit, you are limited to about 2 gigabytes of data**       see http://blog.mongodb.org/post/137788967/32-bit-limitations<br />
Thu Sep  9 13:10:55 db version v1.6.2, pdfile version 4.5</p>
<p>If you want to create mongodb service in linux then use following steps:<br />
[root@sonyk-pc Download]# wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.6.2.tgz [root@sonyk-pc Download]# tar xzf http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.6.2.tgz[root@sonyk-pc Download]# mv mongodb-linux-i686-1.6.2 /opt/mongodb[root@sonyk-pc Download]# mkdir -p /srv/db/mongodb[root@sonyk-pc Download]# touch /srv/db/mongodb.log<br />
[root@sonyk-pc Download]# mkdir /opt/bin/[root@sonyk-pc Download]# mkdir /opt/config/<br />
create the File: /opt/bin/mongodb-stopPut following code in that file;</p>
<pre class="brush: plain; title: ; notranslate">#!/bin/bash
pid=`ps -o pid,command ax | grep mongod | awk '!/awk/ &amp;&amp; !/grep/ {print $1}'`;if [ &quot;${pid}&quot; != &quot;&quot; ]; then    kill -2 ${pid};fi</pre>
<p>create the File: /opt/bin/mongodb-startPut following code in that file:</p>
<pre class="brush: plain; title: ; notranslate">#!/bin/sh
/opt/mongodb/bin/mongod --config /opt/config/mongodb \## --upgrade \ ##runs a database upgrade option if needed \</pre>
<p>File: /opt/config/mongodbPut following code in that file:</p>
<pre class="brush: plain; title: ; notranslate"># Configuration Options for MongoDB## For More Information, Consider:# - Configuration Parameters: http://www.mongodb.org/display/DOCS/Command+Line+Parameters# - File Based Configuration: http://www.mongodb.org/display/DOCS/File+Based+Configuration
dbpath = /srv/db/mongodblogpath = /srv/db/mongodb.loglogappend = true
bind_ip = 127.0.0.1port = 27017fork = true
auth = true# noauth = true</pre>
<p>Do that file as linux executatblechmod +x /opt/bin/mongodb-startchmod +x /opt/bin/mongodb-stop</p>
<p>We&#8217;ve also created a very basic &#8220;init script&#8221; as a wrapper around the mongodb-start and mongo-stop scripts described above. You will still need to modify and manage the configuration of your MongoDB server in the files above. This script only provides a means for ensuring that MongoDB will start at boot. Issue the following commands:<br />
wget http://library.linode.com/databases/mongodb/reference/init-rpm.shmv init-rpm.sh /etc/rc.d/init.d/mongodbchmod +x /etc/rc.d/init.d/mongodb /etc/init.d/mongodbchkconfig &#8211;add mongodbchkconfig &#8211;level 35 mongodb on</p>
<p>You will also need to create a user and group for mongodb; issue the following command:</p>
<pre class="brush: plain; title: ; notranslate">useradd -M -r --home-dir /opt/mongodb mongodb</pre>
<p>Now issue the following command to ensure that the MongoDB user you just created will have access to all required files in the /srv/db/ hierarchy:<br />
chown mongodb:mongodb -R /srv/db/<br />
To start and stop MongoDB using the init script, issue the appropriate command from the following:<br />
/etc/init.d/mongodb start/etc/init.d/mongodb stop</p>
<p>For checking the web admin interface of Mongodb &#8211; listening on port 28017Check this URL : http://localhost:28017/</p>
<h4>Incoming search terms:</h4><ul><li><a href="http://wordpressapi.com/2010/09/09/how-to-install-mongodb-on-linux/" title="amazon ec2 linux startup script for mongodb server">amazon ec2 linux startup script for mongodb server</a></li><li><a href="http://wordpressapi.com/2010/09/09/how-to-install-mongodb-on-linux/" title="installing mongodb on linux">installing mongodb on linux</a></li><li><a href="http://wordpressapi.com/2010/09/09/how-to-install-mongodb-on-linux/" title="mongoDB">mongoDB</a></li><li><a href="http://wordpressapi.com/2010/09/09/how-to-install-mongodb-on-linux/" title="mongodb service linux">mongodb service linux</a></li><li><a href="http://wordpressapi.com/2010/09/09/how-to-install-mongodb-on-linux/" title="install mongodb linux">install mongodb linux</a></li><li><a href="http://wordpressapi.com/2010/09/09/how-to-install-mongodb-on-linux/" title="installing mongo on linux">installing mongo on linux</a></li><li><a href="http://wordpressapi.com/2010/09/09/how-to-install-mongodb-on-linux/" title="how to setup mongodb as a service in linux">how to setup mongodb as a service in linux</a></li><li><a href="http://wordpressapi.com/2010/09/09/how-to-install-mongodb-on-linux/" title="linux install mongodb">linux install mongodb</a></li><li><a href="http://wordpressapi.com/2010/09/09/how-to-install-mongodb-on-linux/" title="mongodb install linux">mongodb install linux</a></li><li><a href="http://wordpressapi.com/2010/09/09/how-to-install-mongodb-on-linux/" title="install mongodb">install mongodb</a></li><li><a href="http://wordpressapi.com/2010/09/09/how-to-install-mongodb-on-linux/" title="mongodb starting as service linux">mongodb starting as service linux</a></li><li><a href="http://wordpressapi.com/2010/09/09/how-to-install-mongodb-on-linux/" title="install mongodb on linux">install mongodb on linux</a></li><li><a href="http://wordpressapi.com/2010/09/09/how-to-install-mongodb-on-linux/" title="how to install mongodb">how to install mongodb</a></li><li><a href="http://wordpressapi.com/2010/09/09/how-to-install-mongodb-on-linux/" title="mongo db linux service">mongo db linux service</a></li><li><a href="http://wordpressapi.com/2010/09/09/how-to-install-mongodb-on-linux/" title="mongodb linux">mongodb linux</a></li><li><a href="http://wordpressapi.com/2010/09/09/how-to-install-mongodb-on-linux/" title="linux mongodb service">linux mongodb service</a></li><li><a href="http://wordpressapi.com/2010/09/09/how-to-install-mongodb-on-linux/" title="mongodb install in linux">mongodb install in linux</a></li><li><a href="http://wordpressapi.com/2010/09/09/how-to-install-mongodb-on-linux/" title="install mongo linux">install mongo linux</a></li><li><a href="http://wordpressapi.com/2010/09/09/how-to-install-mongodb-on-linux/" title="mongodb wallpaper">mongodb wallpaper</a></li><li><a href="http://wordpressapi.com/2010/09/09/how-to-install-mongodb-on-linux/" title="create mongo startup scripts">create mongo startup scripts</a></li></ul><p>Follow us on Twitter <a href="http://twitter.com/wordpressapi">WordPress API</a></p>]]></content:encoded>
			<wfw:commentRss>http://wordpressapi.com/2010/09/09/how-to-install-mongodb-on-linux/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>How to install the Mysql workbench on Fedora</title>
		<link>http://wordpressapi.com/2010/09/01/install-mysql-workbench-fedora/</link>
		<comments>http://wordpressapi.com/2010/09/01/install-mysql-workbench-fedora/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 18:29:03 +0000</pubDate>
		<dc:creator>Wordpress API</dc:creator>
				<category><![CDATA[MySql]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql workbench]]></category>

		<guid isPermaLink="false">http://images.wordpressapi.com/?p=5245</guid>
		<description><![CDATA[http://wordpressapi.com/2010/09/01/install-mysql-workbench-fedora/You can use following commands for installing the Mysql workbench on Linux system. Mysql workbench is very nice tool for creating the ER diagram on mysql database. I personaly like that tool so much. [root@sonyk-pc sony]# rpm -Uvh remi-release-11.rpm warning: &#8230; Continue reading &#8594;]]></description>
			<content:encoded><![CDATA[http://wordpressapi.com/2010/09/01/install-mysql-workbench-fedora/<p>You can use following commands for installing the Mysql workbench on Linux system. Mysql workbench is very nice tool for creating the ER diagram on mysql database. I personaly like that tool so much.<br />
<strong>[root@sonyk-pc sony]# rpm -Uvh remi-release-11.rpm</strong><br />
warning: remi-release-11.rpm: Header V3 DSA signature: NOKEY, key ID 00f97f56<br />
Preparing&#8230;                ########################################### [100%]<br />
1:remi-release           ########################################### [100%]</p>
<p><strong>[root@sonyk-pc sony]# yum &#8211;enablerepo=remi install mysql-workbench</strong><br />
Loaded plugins: refresh-packagekit<br />
remi                                                                                                                                                                                                       | 3.0 kB     00:00<br />
remi/primary_db                                                                                                                                                                                            | 198 kB     00:01<br />
Setting up Install Process<br />
Resolving Dependencies<br />
&#8211;&gt; Running transaction check<br />
&#8212;&gt; Package mysql-workbench.i586 0:5.2.26-1.fc11.remi set to be updated<br />
&#8211;&gt; Processing Dependency: mysql-connector-c++ &gt;= 1.1.0-0.1.bzr888 for package: mysql-workbench-5.2.26-1.fc11.remi.i586<br />
&#8211;&gt; Processing Dependency: python-paramiko for package: mysql-workbench-5.2.26-1.fc11.remi.i586<br />
&#8211;&gt; Running transaction check<br />
&#8212;&gt; Package mysql-connector-c++.i586 0:1.1.0-0.1.bzr888.fc11.remi set to be updated<br />
&#8212;&gt; Package python-paramiko.noarch 0:1.7.5-1.fc11 set to be updated<br />
&#8211;&gt; Finished Dependency Resolution</p>
<p>Dependencies Resolved</p>
<p>==================================================================================================================================================================================================================================<br />
Package                                                    Arch                                          Version                                                            Repository                                      Size<br />
==================================================================================================================================================================================================================================<br />
Installing:<br />
mysql-workbench                                            i586                                          5.2.26-1.fc11.remi                                                 remi                                            14 M<br />
Installing for dependencies:<br />
mysql-connector-c++                                        i586                                          1.1.0-0.1.bzr888.fc11.remi                                         remi                                           252 k<br />
python-paramiko                                            noarch                                        1.7.5-1.fc11                                                       updates                                        982 k</p>
<p>Transaction Summary<br />
==================================================================================================================================================================================================================================<br />
Install       3 Package(s)<br />
Upgrade       0 Package(s)</p>
<p>Total download size: 15 M<br />
Is this ok [y/N]: y<br />
Downloading Packages:<br />
(1/3): mysql-connector-c++-1.1.0-0.1.bzr888.fc11.remi.i586.rpm                                                                                                                                             | 252 kB     00:03<br />
(2/3): mysql-workbench-5.2.26-1.fc11.remi.i586.rpm                                                                                                                                                         |  14 MB     02:17<br />
http://fedoramirror.hnsdc.com/updates/11/i386/python-paramiko-1.7.5-1.fc11.noarch.rpm: [Errno 14] HTTP Error 404: Not Found<br />
Trying other mirror.<br />
(3/3): python-paramiko-1.7.5-1.fc11.noarch.rpm                                                                                                                                                             | 982 kB     00:09<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Total                                                                                                                                                                                              98 kB/s |  15 MB     02:34<br />
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 00f97f56<br />
remi/gpgkey                                                                                                                                                                                                | 1.3 kB     00:00<br />
Importing GPG key 0x00F97F56 &#8220;Remi Collet &#8221; from /etc/pki/rpm-gpg/RPM-GPG-KEY-remi<br />
Is this ok [y/N]: y<br />
Running rpm_check_debug<br />
Running Transaction Test<br />
Finished Transaction Test<br />
Transaction Test Succeeded<br />
Running Transaction<br />
Installing     : python-paramiko-1.7.5-1.fc11.noarch                                                                                                                                                                        1/3<br />
Installing     : mysql-connector-c++-1.1.0-0.1.bzr888.fc11.remi.i586                                                                                                                                                        2/3<br />
Installing     : mysql-workbench-5.2.26-1.fc11.remi.i586                                                                                                                                                                    3/3</p>
<p>Installed:<br />
mysql-workbench.i586 0:5.2.26-1.fc11.remi</p>
<p>Dependency Installed:<br />
mysql-connector-c++.i586 0:1.1.0-0.1.bzr888.fc11.remi                                                                   python-paramiko.noarch 0:1.7.5-1.fc11</p>
<p>Complete!<br />
[root@sonyk-pc sony]#</p>
<p>After installation you will find the mysql workbench under application-&gt; programming  menu</p>
<p>After that you will you will see the following screen.</p>
<p><img class="alignnone size-large wp-image-5246" title="mysql-workbench" src="http://images.wordpressapi.com/mysql-workbench-600x411.jpg" alt="" width="600" height="411" /></p>
<p>clicking on new connection you can create the new connections and after that If you want to create the ER diagram then go to database Option and reverse engineering.</p>
<h4>Incoming search terms:</h4><ul><li><a href="http://wordpressapi.com/2010/09/01/install-mysql-workbench-fedora/" title="instalando mysql workbench no fedora">instalando mysql workbench no fedora</a></li></ul><p>Follow us on Twitter <a href="http://twitter.com/wordpressapi">WordPress API</a></p>]]></content:encoded>
			<wfw:commentRss>http://wordpressapi.com/2010/09/01/install-mysql-workbench-fedora/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Find the largest tables on MySQL Server</title>
		<link>http://wordpressapi.com/2010/08/01/find-the-largest-tables-on-mysql-server/</link>
		<comments>http://wordpressapi.com/2010/08/01/find-the-largest-tables-on-mysql-server/#comments</comments>
		<pubDate>Sun, 01 Aug 2010 06:21:43 +0000</pubDate>
		<dc:creator>Wordpress API</dc:creator>
				<category><![CDATA[MySql]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql interview]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[tables]]></category>

		<guid isPermaLink="false">http://purab.wordpress.com/?p=20</guid>
		<description><![CDATA[http://wordpressapi.com/2010/08/01/find-the-largest-tables-on-mysql-server/Using following article You can find the largest tables from Mysql database. Finding largest tables on MySQL instance is no brainier in MySQL 5.0+ thanks to Information Schema but I still wanted to post little query I use for the &#8230; Continue reading &#8594;]]></description>
			<content:encoded><![CDATA[http://wordpressapi.com/2010/08/01/find-the-largest-tables-on-mysql-server/<p><img class="alignnone size-full wp-image-4977" title="mysql-server" src="http://images.wordpressapi.com/mysql-server.jpg" alt="" width="208" height="243" /></p>
<p>Using following article You can find the largest tables from Mysql database.</p>
<p>Finding largest tables on MySQL instance is no brainier in MySQL 5.0+ thanks to Information Schema but I still wanted to post little query I use for the purpose so I can easily find it later, plus it is quite handy in a way it presents information:</p>
<div class="igBar"><span><a href="http://www.mysqlperformanceblog.com/2008/02/04/finding-out-largest-tables-on-mysql-server/#">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">SQL:</span></p>
<div>
<div class="sql">
<ol>
<li>
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">mysql&gt; <span style="font-weight: bold; color: #993333;">SELECT</span> concat<span style="font-weight: bold; color: #006600;">(</span>table_schema,<span style="color: #ff0000;">&#8216;.&#8217;</span>,table_name<span style="font-weight: bold; color: #006600;">)</span>,concat<span style="font-weight: bold; color: #006600;">(</span>round<span style="font-weight: bold; color: #006600;">(</span>table_rows/<span style="color: #800000;">1000000</span>,<span style="color: #800000;">2</span><span style="font-weight: bold; color: #006600;">)</span>,<span style="color: #ff0000;">&#8216;M&#8217;</span><span style="font-weight: bold; color: #006600;">)</span> rows,concat<span style="font-weight: bold; color: #006600;">(</span>round<span style="font-weight: bold; color: #006600;">(</span>data_length/<span style="font-weight: bold; color: #006600;">(</span><span style="color: #800000;">1024</span>*<span style="color: #800000;">1024</span>*<span style="color: #800000;">1024</span><span style="font-weight: bold; color: #006600;">)</span>,<span style="color: #800000;">2</span><span style="font-weight: bold; color: #006600;">)</span>,<span style="color: #ff0000;">&#8216;G&#8217;</span><span style="font-weight: bold; color: #006600;">)</span> <span style="font-weight: bold; color: #993333;">DATA</span>,concat<span style="font-weight: bold; color: #006600;">(</span>round<span style="font-weight: bold; color: #006600;">(</span>index_length/<span style="font-weight: bold; color: #006600;">(</span><span style="color: #800000;">1024</span>*<span style="color: #800000;">1024</span>*<span style="color: #800000;">1024</span><span style="font-weight: bold; color: #006600;">)</span>,<span style="color: #800000;">2</span><span style="font-weight: bold; color: #006600;">)</span>,<span style="color: #ff0000;">&#8216;G&#8217;</span><span style="font-weight: bold; color: #006600;">)</span> idx,concat<span style="font-weight: bold; color: #006600;">(</span>round<span style="font-weight: bold; color: #006600;">(</span><span style="font-weight: bold; color: #006600;">(</span>data_length+index_length<span style="font-weight: bold; color: #006600;">)</span>/<span style="font-weight: bold; color: #006600;">(</span><span style="color: #800000;">1024</span>*<span style="color: #800000;">1024</span>*<span style="color: #800000;">1024</span><span style="font-weight: bold; color: #006600;">)</span>,<span style="color: #800000;">2</span><span style="font-weight: bold; color: #006600;">)</span>,<span style="color: #ff0000;">&#8216;G&#8217;</span><span style="font-weight: bold; color: #006600;">)</span> total_size,round<span style="font-weight: bold; color: #006600;">(</span>index_length/data_length,<span style="color: #800000;">2</span><span style="font-weight: bold; color: #006600;">)</span> idxfrac <span style="font-weight: bold; color: #993333;">FROM</span> information_schema.<span style="font-weight: bold; color: #993333;">TABLES</span> <span style="font-weight: bold; color: #993333;">ORDER</span> <span style="font-weight: bold; color: #993333;">BY</span> data_length+index_length <span style="font-weight: bold; color: #993333;">DESC</span> <span style="font-weight: bold; color: #993333;">LIMIT</span> <span style="color: #800000;">10</span>;</div>
</li>
<li>
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">+<span style="font-style: italic; color: #808080;">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;+</span></div>
</li>
<li>
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">| concat<span style="font-weight: bold; color: #006600;">(</span>table_schema,<span style="color: #ff0000;">&#8216;.&#8217;</span>,table_name<span style="font-weight: bold; color: #006600;">)</span> | rows   | <span style="font-weight: bold; color: #993333;">DATA</span> | idx    | total_size | idxfrac |</div>
</li>
<li>
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">+<span style="font-style: italic; color: #808080;">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;+</span></div>
</li>
<li>
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">| art87.link_out87                    | <span style="color: #800000;">37</span>.25M | <span style="color: #800000;">14</span>.83G | <span style="color: #800000;">14</span>.17G | <span style="color: #800000;">29</span>.00G     |    <span style="color: #800000;">0</span>.<span style="color: #800000;">96</span> |</div>
</li>
<li>
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">| art87.article87                     | <span style="color: #800000;">12</span>.67M | <span style="color: #800000;">15</span>.83G | <span style="color: #800000;">4</span>.79G  | <span style="color: #800000;">20</span>.62G     |    <span style="color: #800000;">0</span>.<span style="color: #800000;">30</span> |</div>
</li>
<li>
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">| art116.article116                   | <span style="color: #800000;">10</span>.49M | <span style="color: #800000;">12</span>.52G | <span style="color: #800000;">3</span>.65G  | <span style="color: #800000;">16</span>.18G     |    <span style="color: #800000;">0</span>.<span style="color: #800000;">29</span> |</div>
</li>
<li>
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">| art84.article84                     | <span style="color: #800000;">10</span>.10M | <span style="color: #800000;">10</span>.11G | <span style="color: #800000;">3</span>.59G  | <span style="color: #800000;">13</span>.70G     |    <span style="color: #800000;">0</span>.<span style="color: #800000;">35</span> |</div>
</li>
<li>
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">| art104.link_out104                  | <span style="color: #800000;">23</span>.66M | <span style="color: #800000;">6</span>.63G  | <span style="color: #800000;">6</span>.55G  | <span style="color: #800000;">13</span>.18G     |    <span style="color: #800000;">0</span>.<span style="color: #800000;">99</span> |</div>
</li>
<li>
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">| art118.article118                   | <span style="color: #800000;">7</span>.06M  | <span style="color: #800000;">10</span>.49G | <span style="color: #800000;">2</span>.68G  | <span style="color: #800000;">13</span>.17G     |    <span style="color: #800000;">0</span>.<span style="color: #800000;">26</span> |</div>
</li>
<li>
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">| art106.article106                   | <span style="color: #800000;">9</span>.86M  | <span style="color: #800000;">10</span>.19G | <span style="color: #800000;">2</span>.76G  | <span style="color: #800000;">12</span>.95G     |    <span style="color: #800000;">0</span>.<span style="color: #800000;">27</span> |</div>
</li>
<li>
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">| art85.article85                     | <span style="color: #800000;">6</span>.20M  | <span style="color: #800000;">9</span>.82G  | <span style="color: #800000;">2</span>.51G  | <span style="color: #800000;">12</span>.33G     |    <span style="color: #800000;">0</span>.<span style="color: #800000;">26</span> |</div>
</li>
<li>
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">| art91.article91                     | <span style="color: #800000;">8</span>.66M  | <span style="color: #800000;">9</span>.17G  | <span style="color: #800000;">2</span>.66G  | <span style="color: #800000;">11</span>.83G     |    <span style="color: #800000;">0</span>.<span style="color: #800000;">29</span> |</div>
</li>
<li>
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">| art94.article94                     | <span style="color: #800000;">5</span>.21M  | <span style="color: #800000;">10</span>.10G | <span style="color: #800000;">1</span>.69G  | <span style="color: #800000;">11</span>.79G     |    <span style="color: #800000;">0</span>.<span style="color: #800000;">17</span> |</div>
</li>
<li>
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">+<span style="font-style: italic; color: #808080;">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;+</span></div>
</li>
<li>
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #800000;">10</span> rows <span style="font-weight: bold; color: #993333;">IN</span> <span style="font-weight: bold; color: #993333;">SET</span> <span style="font-weight: bold; color: #006600;">(</span><span style="color: #800000;">2</span> min <span style="color: #800000;">29</span>.<span style="color: #800000;">19</span> sec<span style="font-weight: bold; color: #006600;">)</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>I do some converting and rounding to see number of rows in millions and data and index size in GB so I can save on counting zeros.<br />
The last column shows how much does the index take compared to the data which is mainly for informational purposes but for MyISAM can also help you to size your key buffer compared to operating system cache.</p>
<p>I also use it to see which tables may be worth to review in terms of indexes. Large index size compared to data size often indicates there is a lot of indexes (so it is well possible there are some <a href="http://www.mysqlperformanceblog.com/2006/08/17/duplicate-indexes-and-redundant-indexes/">duplicates, redundant </a>or simply unused indexes among them) or may be there is long primary key with Innodb tables. Of course it also could be perfectly fine tables but it is worth to look.</p>
<p>Changing the query a bit to look for different sorting order or extra data &#8211; such as average row length you can learn quite a lot about your schema this way.</p>
<p>It is also worth to note queries on information_schema can be rather slow if you have a lot of large tables. On this instance it took 2.5 minutes to run for 450 tables.</p>
<p><strong>UPDATE:</strong> To make things easier I&#8217;ve added INFORMATION_SCHEMA to the query so it works whatever database you have active. It does not work with MySQL before 5.0 still of course</p>
<h4>Incoming search terms:</h4><ul><li><a href="http://wordpressapi.com/2010/08/01/find-the-largest-tables-on-mysql-server/" title="wordpress mysql api">wordpress mysql api</a></li></ul><p>Follow us on Twitter <a href="http://twitter.com/wordpressapi">WordPress API</a></p>]]></content:encoded>
			<wfw:commentRss>http://wordpressapi.com/2010/08/01/find-the-largest-tables-on-mysql-server/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

<!-- Served from: wordpressapi.com @ 2012-02-05 13:29:45 by W3 Total Cache -->
