<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux Ask! &#187; MySQL</title>
	<atom:link href="http://www.linuxask.com/topics/databases/mysql/feed" rel="self" type="application/rss+xml" />
	<link>http://www.linuxask.com</link>
	<description>Linux Ask! is a Q &#38; A web site specific for Linux related questions such as how to use common Linux commands.</description>
	<lastBuildDate>Sat, 04 Feb 2012 05:57:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Show the current privileges of a MySQL user</title>
		<link>http://www.linuxask.com/questions/show-the-current-privileges-of-a-mysql-user</link>
		<comments>http://www.linuxask.com/questions/show-the-current-privileges-of-a-mysql-user#comments</comments>
		<pubDate>Sat, 24 Sep 2011 13:28:13 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=3484</guid>
		<description><![CDATA[Show the current privileges of a MySQL user Answer: To show the current privileges of a MySQL user, you can use the SHOW GRANTS statement E.g. mysql&#62; SHOW GRANTS; +----------------------------------------------------------------------------------------------------------------------------------------+ &#124; Grants for root@localhost &#124; +----------------------------------------------------------------------------------------------------------------------------------------+ &#124; GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*****************************************' WITH GRANT OPTION &#124; +----------------------------------------------------------------------------------------------------------------------------------------+ Related posts: <a href='http://www.linuxask.com/questions/show-the-current-privileges-of-a-mysql-user'>[...]</a>
Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/how-to-create-a-new-mysql-user' rel='bookmark' title='How to create a new MySQL user?'>How to create a new MySQL user?</a></li>
<li><a href='http://www.linuxask.com/questions/show-the-current-user-in-mysql' rel='bookmark' title='Show the current user in MySQL'>Show the current user in MySQL</a></li>
<li><a href='http://www.linuxask.com/questions/reset-mysql-root-password' rel='bookmark' title='Reset MySQL root password'>Reset MySQL root password</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Show the current privileges of a MySQL user</p>
<p><strong>Answer:</strong></p>
<p>To show the current privileges of a <strong>MySQL </strong>user, you can use the <strong>SHOW GRANTS</strong> statement</p>
<p>E.g.</p>
<pre><code>mysql&gt; SHOW GRANTS;

+----------------------------------------------------------------------------------------------------------------------------------------+
| Grants for root@localhost                                                                                                              |
+----------------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*****************************************' WITH GRANT OPTION |
+----------------------------------------------------------------------------------------------------------------------------------------+</code></pre>
<p>Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/how-to-create-a-new-mysql-user' rel='bookmark' title='How to create a new MySQL user?'>How to create a new MySQL user?</a></li>
<li><a href='http://www.linuxask.com/questions/show-the-current-user-in-mysql' rel='bookmark' title='Show the current user in MySQL'>Show the current user in MySQL</a></li>
<li><a href='http://www.linuxask.com/questions/reset-mysql-root-password' rel='bookmark' title='Reset MySQL root password'>Reset MySQL root password</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/show-the-current-privileges-of-a-mysql-user/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Show the current user in MySQL</title>
		<link>http://www.linuxask.com/questions/show-the-current-user-in-mysql</link>
		<comments>http://www.linuxask.com/questions/show-the-current-user-in-mysql#comments</comments>
		<pubDate>Fri, 16 Sep 2011 13:37:37 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=3489</guid>
		<description><![CDATA[Show the current user in MySQL Answer: Like in the shell, we can execute the command whoami to find out the current user name, we can use the function CURRENT_USER(); E.g. mysql&#62; SELECT CURRENT_USER(); +----------------+ &#124; CURRENT_USER() &#124; +----------------+ &#124; root@localhost &#124; +----------------+ 1 row in set (0.00 sec) Related posts: Show the current privileges <a href='http://www.linuxask.com/questions/show-the-current-user-in-mysql'>[...]</a>
Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/show-the-current-privileges-of-a-mysql-user' rel='bookmark' title='Show the current privileges of a MySQL user'>Show the current privileges of a MySQL user</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-create-a-new-mysql-user' rel='bookmark' title='How to create a new MySQL user?'>How to create a new MySQL user?</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-delete-mysql-user' rel='bookmark' title='How to delete MySQL user?'>How to delete MySQL user?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Show the current user in MySQL</p>
<p><strong>Answer:</strong></p>
<p>Like in the shell, we can execute the command <strong><a href="http://www.linuxask.com/questions/display-current-login-user-information">whoami </a></strong>to find out the current user name, we can use the function <strong>CURRENT_USER()</strong>;</p>
<p>E.g.</p>
<pre><code>mysql&gt; SELECT CURRENT_USER();
+----------------+
| CURRENT_USER() |
+----------------+
| root@localhost |
+----------------+
1 row in set (0.00 sec)</code></pre>
<p>Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/show-the-current-privileges-of-a-mysql-user' rel='bookmark' title='Show the current privileges of a MySQL user'>Show the current privileges of a MySQL user</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-create-a-new-mysql-user' rel='bookmark' title='How to create a new MySQL user?'>How to create a new MySQL user?</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-delete-mysql-user' rel='bookmark' title='How to delete MySQL user?'>How to delete MySQL user?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/show-the-current-user-in-mysql/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disable MySQL server from listening for TCP/IP connections</title>
		<link>http://www.linuxask.com/questions/disable-mysql-server-from-listening-for-tcpip-connections</link>
		<comments>http://www.linuxask.com/questions/disable-mysql-server-from-listening-for-tcpip-connections#comments</comments>
		<pubDate>Thu, 25 Aug 2011 13:51:20 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=3408</guid>
		<description><![CDATA[Disable MySQL server from listening for TCP/IP connections Answer: If you only connect to the MySQL server from localhost and you might want to disable TCP/IP networking feature so the server is more secure. To do so, edit the MySQL configurations, e.g. /etc/my.cnf .. skip-networking .. Don't forget to restart MySQL to take effect. # <a href='http://www.linuxask.com/questions/disable-mysql-server-from-listening-for-tcpip-connections'>[...]</a>
Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/disable-dns-hostname-lookup-in-mysql' rel='bookmark' title='Disable DNS hostname lookup in MySQL'>Disable DNS hostname lookup in MySQL</a></li>
<li><a href='http://www.linuxask.com/questions/turn-off-innodb-support-in-mysql' rel='bookmark' title='Turn off InnoDB support in MySQL'>Turn off InnoDB support in MySQL</a></li>
<li><a href='http://www.linuxask.com/questions/set-the-maximum-allowed-number-of-connections-in-mysql' rel='bookmark' title='Set the maximum allowed number of connections in MySQL'>Set the maximum allowed number of connections in MySQL</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Disable MySQL server from listening for TCP/IP connections</p>
<p><strong>Answer:</strong></p>
<p>If you only connect to the MySQL server from localhost and you might want to disable TCP/IP networking feature so the server is more secure.</p>
<p>To do so, edit the MySQL configurations, e.g. <strong>/etc/my.cnf</strong></p>
<pre><code>..
skip-networking
..</code></pre>
<p>Don't forget to <strong>restart </strong>MySQL to take effect.</p>
<p><code># /sbin/service mysqld restart</code></p>
<p>Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/disable-dns-hostname-lookup-in-mysql' rel='bookmark' title='Disable DNS hostname lookup in MySQL'>Disable DNS hostname lookup in MySQL</a></li>
<li><a href='http://www.linuxask.com/questions/turn-off-innodb-support-in-mysql' rel='bookmark' title='Turn off InnoDB support in MySQL'>Turn off InnoDB support in MySQL</a></li>
<li><a href='http://www.linuxask.com/questions/set-the-maximum-allowed-number-of-connections-in-mysql' rel='bookmark' title='Set the maximum allowed number of connections in MySQL'>Set the maximum allowed number of connections in MySQL</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/disable-mysql-server-from-listening-for-tcpip-connections/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Show the storage used by a database in MySQL</title>
		<link>http://www.linuxask.com/questions/show-the-storage-used-by-a-database-in-mysql</link>
		<comments>http://www.linuxask.com/questions/show-the-storage-used-by-a-database-in-mysql#comments</comments>
		<pubDate>Thu, 11 Aug 2011 13:32:31 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=3286</guid>
		<description><![CDATA[Show the storage used by a database in MySQL Answer: In previous article, we have already discussed how to list the database size in your MySQL server. But if you want to have a more detail view on an individual database, you can try the following (crazy) SQL. SELECT s.schema_name, CONCAT(IFNULL(ROUND((SUM(t.data_length)+SUM(t.index_length)) /1024/1024,2),0.00),"Mb") total_size, CONCAT(IFNULL(ROUND(((SUM(t.data_length)+SUM(t.index_length))-SUM(t.data_free))/1024/1024,2),0.00),"Mb") data_used, <a href='http://www.linuxask.com/questions/show-the-storage-used-by-a-database-in-mysql'>[...]</a>
Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/list-all-the-database-size-in-mysql' rel='bookmark' title='List all the database size in MySQL'>List all the database size in MySQL</a></li>
<li><a href='http://www.linuxask.com/questions/drop-all-tables-in-mysql-database' rel='bookmark' title='Drop all tables in MySQL database'>Drop all tables in MySQL database</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-rename-database-in-mysql' rel='bookmark' title='How to rename database in MySQL'>How to rename database in MySQL</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Show the storage used by a database in MySQL</p>
<p><strong>Answer:</strong></p>
<p>In <a href="http://www.linuxask.com/questions/list-all-the-database-size-in-mysql">previous article</a>, we have already discussed how to list the database size in your <strong>MySQL </strong>server.</p>
<p>But if you want to have a more detail view on an individual database, you can try the following (crazy) SQL.</p>
<pre><code>SELECT s.schema_name,
CONCAT(IFNULL(ROUND((SUM(t.data_length)+SUM(t.index_length))
/1024/1024,2),0.00),"Mb") total_size,
CONCAT(IFNULL(ROUND(((SUM(t.data_length)+SUM(t.index_length))-SUM(t.data_free))/1024/1024,2),0.00),"Mb")

data_used,
CONCAT(IFNULL(ROUND(SUM(data_free)/1024/1024,2),0.00),"Mb") data_free,
IFNULL(ROUND((((SUM(t.data_length)+SUM(t.index_length))-SUM(t.data_free))
/((SUM(t.data_length)+SUM(t.index_length)))*100),2),0) pct_used,
COUNT(table_name) total_tables
FROM INFORMATION_SCHEMA.SCHEMATA s
LEFT JOIN INFORMATION_SCHEMA.TABLES t ON s.schema_name = t.table_schema
WHERE s.schema_name = "mydatabase"
GROUP BY s.schema_name
ORDER BY pct_used DESC\G</code></pre>
<p>It will give you something like the following..</p>
<pre><code> schema_name: mydatabase
  total_size: 165.09Mb
   data_used: 12.09Mb
   data_free: 153.00Mb
    pct_used: 7.33
total_tables: 133</code></pre>
<p>Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/list-all-the-database-size-in-mysql' rel='bookmark' title='List all the database size in MySQL'>List all the database size in MySQL</a></li>
<li><a href='http://www.linuxask.com/questions/drop-all-tables-in-mysql-database' rel='bookmark' title='Drop all tables in MySQL database'>Drop all tables in MySQL database</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-rename-database-in-mysql' rel='bookmark' title='How to rename database in MySQL'>How to rename database in MySQL</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/show-the-storage-used-by-a-database-in-mysql/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to change the MySQL temporary directory</title>
		<link>http://www.linuxask.com/questions/how-to-change-the-mysql-temporary-directory</link>
		<comments>http://www.linuxask.com/questions/how-to-change-the-mysql-temporary-directory#comments</comments>
		<pubDate>Sun, 17 Jul 2011 04:55:29 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=3002</guid>
		<description><![CDATA[How to change the MySQL temporary directory Answer: To change the temporary directory of your MySQL server to use a non-default directory, you can change the tmpdir parameter in your my.cnf .. tmpdir = /data/tmp .. Don't forget to change the permission of that temporary directory # sudo chmod mysql:mysql /data/tmp Then restart MySQL to <a href='http://www.linuxask.com/questions/how-to-change-the-mysql-temporary-directory'>[...]</a>
Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/change-the-maximum-allowed-binary-log-file-size-in-mysql' rel='bookmark' title='Change the maximum allowed binary log file size in MySQL'>Change the maximum allowed binary log file size in MySQL</a></li>
<li><a href='http://www.linuxask.com/questions/changing-the-default-storage-engine-in-mysql' rel='bookmark' title='Changing the default storage engine in MySQL'>Changing the default storage engine in MySQL</a></li>
<li><a href='http://www.linuxask.com/questions/set-the-maximum-allowed-number-of-connections-in-mysql' rel='bookmark' title='Set the maximum allowed number of connections in MySQL'>Set the maximum allowed number of connections in MySQL</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>How to change the MySQL temporary directory</p>
<p><strong>Answer:</strong></p>
<p>To change the temporary directory of your MySQL server to use a non-default directory, you can change the <strong>tmpdir</strong> parameter in your <strong>my.cnf</strong></p>
<pre><code>..
tmpdir = /data/tmp
..</code></pre>
<p>Don't forget to change the permission of that temporary directory</p>
<p><code># sudo chmod mysql:mysql /data/tmp</code></p>
<p>Then <strong>restart </strong>MySQL to take effect.</p>
<p><code># /sbin/service mysqld restart</code></p>
<p>Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/change-the-maximum-allowed-binary-log-file-size-in-mysql' rel='bookmark' title='Change the maximum allowed binary log file size in MySQL'>Change the maximum allowed binary log file size in MySQL</a></li>
<li><a href='http://www.linuxask.com/questions/changing-the-default-storage-engine-in-mysql' rel='bookmark' title='Changing the default storage engine in MySQL'>Changing the default storage engine in MySQL</a></li>
<li><a href='http://www.linuxask.com/questions/set-the-maximum-allowed-number-of-connections-in-mysql' rel='bookmark' title='Set the maximum allowed number of connections in MySQL'>Set the maximum allowed number of connections in MySQL</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/how-to-change-the-mysql-temporary-directory/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alter all tables in MySQL</title>
		<link>http://www.linuxask.com/questions/alter-all-tables-in-mysql</link>
		<comments>http://www.linuxask.com/questions/alter-all-tables-in-mysql#comments</comments>
		<pubDate>Wed, 13 Jul 2011 13:48:51 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=3062</guid>
		<description><![CDATA[Alter all tables in MySQL Answer: To alter all the tables in a given database in MySQL, e.g. change the storage engine, you can first generate the SQL statements using following method. mysql&#62; select CONCAT("Alter Table `", TABLE_SCHEMA,"`.`", TABLE_NAME, "` ENGINE = InnoDB") AS cmd from TABLES where TABLE_SCHEMA = "test"; It will print out <a href='http://www.linuxask.com/questions/alter-all-tables-in-mysql'>[...]</a>
Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/drop-all-tables-in-mysql-database' rel='bookmark' title='Drop all tables in MySQL database'>Drop all tables in MySQL database</a></li>
<li><a href='http://www.linuxask.com/questions/show-all-tables-started-with-a-prefix-in-mysql' rel='bookmark' title='Show all tables started with a prefix in MySQL'>Show all tables started with a prefix in MySQL</a></li>
<li><a href='http://www.linuxask.com/questions/optimize-table-in-mysql' rel='bookmark' title='Optimize table in MySQL'>Optimize table in MySQL</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Alter all tables in MySQL</p>
<p><strong>Answer:</strong></p>
<p>To alter all the tables in a given database in MySQL, e.g. change the storage engine, you can first generate the SQL statements using following method.</p>
<p><code>mysql&gt; select CONCAT("Alter Table `", TABLE_SCHEMA,"`.`", TABLE_NAME, "` ENGINE = InnoDB") AS cmd from TABLES where TABLE_SCHEMA = "test";</code></p>
<p>It will print out the followings:</p>
<pre><code>+----------------------------------------------------------------+
| cmd                                                            |
+----------------------------------------------------------------+
| Alter Table `test`.`foo`  ENGINE = InnoDB                      |
| Alter Table `test`.`bar`  ENGINE = InnoDB                      |
...
</code></pre>
<p>Then you can execute the above commands manually.</p>
<p>Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/drop-all-tables-in-mysql-database' rel='bookmark' title='Drop all tables in MySQL database'>Drop all tables in MySQL database</a></li>
<li><a href='http://www.linuxask.com/questions/show-all-tables-started-with-a-prefix-in-mysql' rel='bookmark' title='Show all tables started with a prefix in MySQL'>Show all tables started with a prefix in MySQL</a></li>
<li><a href='http://www.linuxask.com/questions/optimize-table-in-mysql' rel='bookmark' title='Optimize table in MySQL'>Optimize table in MySQL</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/alter-all-tables-in-mysql/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Auto remove expired binary log in MySQL</title>
		<link>http://www.linuxask.com/questions/auto-remove-expired-binary-log-in-mysql</link>
		<comments>http://www.linuxask.com/questions/auto-remove-expired-binary-log-in-mysql#comments</comments>
		<pubDate>Tue, 05 Jul 2011 08:31:28 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=3057</guid>
		<description><![CDATA[Auto remove expired binary log in MySQL Answer: If you have enabled the binary log in your MySQL server, you need to be aware that the log will use up the space of your local disk space. Old binary logs are generally not needed and you can auto remove expired entries from the binary log. <a href='http://www.linuxask.com/questions/auto-remove-expired-binary-log-in-mysql'>[...]</a>
Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/mysql-binary-log-files-take-all-of-my-disk-space' rel='bookmark' title='MySQL binary log files take all of my disk space'>MySQL binary log files take all of my disk space</a></li>
<li><a href='http://www.linuxask.com/questions/what-are-the-difference-between-char-binary-and-binary-type-in-mysql' rel='bookmark' title='What are the difference between CHAR BINARY and BINARY type in MySQL'>What are the difference between CHAR BINARY and BINARY type in MySQL</a></li>
<li><a href='http://www.linuxask.com/questions/setting-the-mysqls-binary-log-format' rel='bookmark' title='Setting the MySQL&#8217;s Binary Log Format'>Setting the MySQL&#8217;s Binary Log Format</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Auto remove expired binary log in MySQL</p>
<p><strong>Answer:</strong></p>
<p>If you have <a href="http://www.linuxask.com/questions/enable-mysql-binary-log-bin-log">enabled the binary log</a> in your MySQL server, you need to be aware that the log will use up the space of your local disk space. Old binary logs are generally not needed and you can auto remove expired entries from the binary log.</p>
<p>To do so, edit the MySQL configurations, e.g. <strong>/etc/my.cnf</strong></p>
<pre><code>..
expire_logs_days        = 60
..</code></pre>
<p>The above configuration will auto remove entries in the binary old if they are older than 60 days.</p>
<p>Don't forget to <strong>restart </strong>MySQL to take effect.</p>
<p><code># /sbin/service mysqld restart</code></p>
<p>Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/mysql-binary-log-files-take-all-of-my-disk-space' rel='bookmark' title='MySQL binary log files take all of my disk space'>MySQL binary log files take all of my disk space</a></li>
<li><a href='http://www.linuxask.com/questions/what-are-the-difference-between-char-binary-and-binary-type-in-mysql' rel='bookmark' title='What are the difference between CHAR BINARY and BINARY type in MySQL'>What are the difference between CHAR BINARY and BINARY type in MySQL</a></li>
<li><a href='http://www.linuxask.com/questions/setting-the-mysqls-binary-log-format' rel='bookmark' title='Setting the MySQL&#8217;s Binary Log Format'>Setting the MySQL&#8217;s Binary Log Format</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/auto-remove-expired-binary-log-in-mysql/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updated the Slave binary log if the updates are received from a MySQL master</title>
		<link>http://www.linuxask.com/questions/updated-the-slave-binary-log-if-the-updates-are-received-from-a-mysql-master</link>
		<comments>http://www.linuxask.com/questions/updated-the-slave-binary-log-if-the-updates-are-received-from-a-mysql-master#comments</comments>
		<pubDate>Sat, 25 Jun 2011 14:17:24 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=3140</guid>
		<description><![CDATA[Updated the Slave binary log if the updates are received from a MySQL master Answer: When the updates are received from a MySQL master to a slave, it will not be logged in the binary log of the slave server. Sometimes, you might want to enable it, for example, in order to setup a chained <a href='http://www.linuxask.com/questions/updated-the-slave-binary-log-if-the-updates-are-received-from-a-mysql-master'>[...]</a>
Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/mysql-binary-log-files-take-all-of-my-disk-space' rel='bookmark' title='MySQL binary log files take all of my disk space'>MySQL binary log files take all of my disk space</a></li>
<li><a href='http://www.linuxask.com/questions/change-mysql-replication-master-host' rel='bookmark' title='Change MySQL replication master host'>Change MySQL replication master host</a></li>
<li><a href='http://www.linuxask.com/questions/enable-mysql-binary-log-bin-log' rel='bookmark' title='Enable MySQL binary log (bin log)'>Enable MySQL binary log (bin log)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Updated the Slave binary log if the updates are received from a MySQL master</p>
<p><strong>Answer:</strong></p>
<p>When the updates are received from a MySQL master to a slave, it will not be logged in the binary log of the slave server. Sometimes, you might want to enable it, for example, in order to setup a <strong>chained replication</strong>.</p>
<p>To do so, edit the MySQL configurations, e.g. <strong>/etc/my.cnf</strong></p>
<pre><code>..
log-slave-updates
..</code></pre>
<p>Don't forget to <strong>restart </strong>MySQL to take effect.</p>
<p><code># /sbin/service mysqld restart</code></p>
<p>Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/mysql-binary-log-files-take-all-of-my-disk-space' rel='bookmark' title='MySQL binary log files take all of my disk space'>MySQL binary log files take all of my disk space</a></li>
<li><a href='http://www.linuxask.com/questions/change-mysql-replication-master-host' rel='bookmark' title='Change MySQL replication master host'>Change MySQL replication master host</a></li>
<li><a href='http://www.linuxask.com/questions/enable-mysql-binary-log-bin-log' rel='bookmark' title='Enable MySQL binary log (bin log)'>Enable MySQL binary log (bin log)</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/updated-the-slave-binary-log-if-the-updates-are-received-from-a-mysql-master/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perform XtraBackup and zip to a file</title>
		<link>http://www.linuxask.com/questions/perform-xtrabackup-and-zip-to-a-file</link>
		<comments>http://www.linuxask.com/questions/perform-xtrabackup-and-zip-to-a-file#comments</comments>
		<pubDate>Tue, 07 Jun 2011 05:24:06 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[innodb]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=3082</guid>
		<description><![CDATA[Perform XtraBackup and zip to a file Answer: In the previous article, we have discussed how to perform a hot backup on InnoDB with XtraBackup , but is it possible to zip the result directly to a file? Sure, you can use the wrapper script came with the XtraBackup - innobackupex For example, to backup <a href='http://www.linuxask.com/questions/perform-xtrabackup-and-zip-to-a-file'>[...]</a>
Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/how-to-perform-hot-backup-for-innodb' rel='bookmark' title='How to perform hot backup for InnoDB'>How to perform hot backup for InnoDB</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-perform-checksum-on-a-file' rel='bookmark' title='How to perform checksum on a file?'>How to perform checksum on a file?</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-perform-checksum-on-a-folder' rel='bookmark' title='How to perform checksum on a folder?'>How to perform checksum on a folder?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Perform XtraBackup and zip to a file</p>
<p><strong>Answer:</strong></p>
<p>In the previous <a href="http://www.linuxask.com/questions/how-to-perform-hot-backup-for-innodb">article</a>, we have discussed how to perform a hot backup on InnoDB with <strong>XtraBackup </strong>, but is it possible to zip the result directly to a file?</p>
<p>Sure, you can use the wrapper script came with the XtraBackup - <strong>innobackupex</strong></p>
<p>For example, to backup and zip the result files to zipped files, you can use:</p>
<p><code># innobackupex --stream=tar ./ | gzip - > backup.tar.gz</code></p>
<p>Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/how-to-perform-hot-backup-for-innodb' rel='bookmark' title='How to perform hot backup for InnoDB'>How to perform hot backup for InnoDB</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-perform-checksum-on-a-file' rel='bookmark' title='How to perform checksum on a file?'>How to perform checksum on a file?</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-perform-checksum-on-a-folder' rel='bookmark' title='How to perform checksum on a folder?'>How to perform checksum on a folder?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/perform-xtrabackup-and-zip-to-a-file/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to perform hot backup for InnoDB</title>
		<link>http://www.linuxask.com/questions/how-to-perform-hot-backup-for-innodb</link>
		<comments>http://www.linuxask.com/questions/how-to-perform-hot-backup-for-innodb#comments</comments>
		<pubDate>Sun, 22 May 2011 05:07:48 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[innodb]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=3078</guid>
		<description><![CDATA[How to perform hot backup for InnoDB? Answer: You can buy the official backup tool - "InnoDB Hot Backup" if you have the money. But you can also use the free alternative - the Percona XtraBackup To download and install, you can refer to their web site: http://www.percona.com/docs/wiki/percona-xtrabackup:installation:binaries To perform a quick and simple backup, <a href='http://www.linuxask.com/questions/how-to-perform-hot-backup-for-innodb'>[...]</a>
Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/perform-xtrabackup-and-zip-to-a-file' rel='bookmark' title='Perform XtraBackup and zip to a file'>Perform XtraBackup and zip to a file</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-dump-an-mysqlinnodb-database' rel='bookmark' title='How to dump an MySQL/InnoDB database'>How to dump an MySQL/InnoDB database</a></li>
<li><a href='http://www.linuxask.com/questions/turn-off-innodb-support-in-mysql' rel='bookmark' title='Turn off InnoDB support in MySQL'>Turn off InnoDB support in MySQL</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>How to perform hot backup for InnoDB?</p>
<p>Answer:</p>
<p>You can buy the official backup tool - "<strong><a href="http://www.innodb.com/wp/products/hot-backup/">InnoDB Hot Backup</a></strong>" if you have the money. But you can also use the free alternative - the <strong><a href="http://www.percona.com/docs/wiki/percona-xtrabackup:start">Percona XtraBackup</a></strong></p>
<p>To download and install, you can refer to their web site: <a href="http://www.percona.com/docs/wiki/percona-xtrabackup:installation:binaries">http://www.percona.com/docs/wiki/percona-xtrabackup:installation:binaries<br />
</a></p>
<p>To perform a quick and simple backup, you need:</p>
<p><code># sudo xtrabackup --defaults-file=/etc/mysql/my.cnf --backup --target-dir=/tmp/backup --datadir=/var/lib/mysql</code></p>
<p>Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/perform-xtrabackup-and-zip-to-a-file' rel='bookmark' title='Perform XtraBackup and zip to a file'>Perform XtraBackup and zip to a file</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-dump-an-mysqlinnodb-database' rel='bookmark' title='How to dump an MySQL/InnoDB database'>How to dump an MySQL/InnoDB database</a></li>
<li><a href='http://www.linuxask.com/questions/turn-off-innodb-support-in-mysql' rel='bookmark' title='Turn off InnoDB support in MySQL'>Turn off InnoDB support in MySQL</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/how-to-perform-hot-backup-for-innodb/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

