<?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>Riding The Breeze &#187; MySQL</title>
	<atom:link href="http://www.iliveinperego.com/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.iliveinperego.com</link>
	<description>Yes !</description>
	<lastBuildDate>Fri, 12 Feb 2010 09:46:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CSV export from MySQL</title>
		<link>http://www.iliveinperego.com/2007/09/csv-export-from-mysql/</link>
		<comments>http://www.iliveinperego.com/2007/09/csv-export-from-mysql/#comments</comments>
		<pubDate>Sat, 15 Sep 2007 15:17:36 +0000</pubDate>
		<dc:creator>simone</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Things I forget]]></category>

		<guid isPermaLink="false">http://www.iliveinperego.com/csv-export-from-mysql</guid>
		<description><![CDATA[If you have access on the machine with MySQL and you need to export all tables in a database you can use:
hpatoio@namazu:~$ mysqldump -uroot -p DATABASE_NAME -T '/home/simone/export_csv' --fields-terminated-by "," --fields-enclosed-by '"' --lines-terminated-by "\n"
the script will create a files for each table of the DB and will place it in export_csv.
If you need to export [...]]]></description>
			<content:encoded><![CDATA[<p>If you have access on the machine with MySQL and you need to export all tables in a database you can use:</p>
<p><code>hpatoio@namazu:~$ mysqldump -uroot -p DATABASE_NAME -T '/home/simone/export_csv' --fields-terminated-by "," --fields-enclosed-by '"' --lines-terminated-by "\n"</code></p>
<p>the script will create a files for each table of the DB and will place it in <em>export_csv</em>.</p>
<p>If you need to export a custom resultset or you need to export data from a remote MySQL server on your machine you can use this command :</p>
<p><code>hpatoio@namazu:~$ mysql -uroot -h HOSTNAME -p DATABASE_NAME -B -e "select field1,field2 ... fieldX from \`TABLE_NAME\`;" | sed 's/\t/","/g;s/^/"/;s/$/"/;s/\n//g' &gt; my_export.csv</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iliveinperego.com/2007/09/csv-export-from-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft Access to MySQL &#124; Online converter</title>
		<link>http://www.iliveinperego.com/2007/09/access-2-mysql-online-converter/</link>
		<comments>http://www.iliveinperego.com/2007/09/access-2-mysql-online-converter/#comments</comments>
		<pubDate>Tue, 11 Sep 2007 07:41:17 +0000</pubDate>
		<dc:creator>simone</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.iliveinperego.com/access-2-mysql-online-converter</guid>
		<description><![CDATA[Amazing online tool to convert  MDB Microsoft Access file to MySQL SQL scripts !
Check it out -> http://www.mdb2mysql.com/
]]></description>
			<content:encoded><![CDATA[<p>Amazing <strong>online</strong> tool to convert  MDB Microsoft Access file to MySQL SQL scripts !</p>
<p>Check it out -> <a href="http://www.mdb2mysql.com/">http://www.mdb2mysql.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iliveinperego.com/2007/09/access-2-mysql-online-converter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ops &#8230;</title>
		<link>http://www.iliveinperego.com/2006/10/ops/</link>
		<comments>http://www.iliveinperego.com/2006/10/ops/#comments</comments>
		<pubDate>Sun, 08 Oct 2006 21:44:42 +0000</pubDate>
		<dc:creator>simone</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Things I forget]]></category>

		<guid isPermaLink="false">http://www.iliveinperego.com/ops</guid>
		<description><![CDATA[Oh no ! It happend again !!
The sysadmin turned on the gpc_magic_quotes and you got the DB full of \&#039;
Here a fast way to get back the correct values.

UPDATE table_name SET field_name = REPLACE(field_name,&#039;\&#034;&#039;,&#034;&#034;)
 
]]></description>
			<content:encoded><![CDATA[<p>Oh no ! It happend again !!</p>
<p>The sysadmin turned on the gpc_magic_quotes and you got the <acronym title="Database">DB</acronym> full of \&#039;</p>
<p>Here a fast way to get back the correct values.</p>
<blockquote><p>
UPDATE <em>table_name</em> SET <em>field_name</em> = REPLACE(<em>field_name</em>,&#039;\&#034;&#039;,&#034;&#034;)
 </p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.iliveinperego.com/2006/10/ops/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Access Mysql from other machines</title>
		<link>http://www.iliveinperego.com/2006/08/access-mysql-from-other-machine/</link>
		<comments>http://www.iliveinperego.com/2006/08/access-mysql-from-other-machine/#comments</comments>
		<pubDate>Tue, 29 Aug 2006 20:46:54 +0000</pubDate>
		<dc:creator>simone</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Things I forget]]></category>

		<guid isPermaLink="false">http://www.iliveinperego.com/access-mysql-from-other-machine</guid>
		<description><![CDATA[For security reason, MySQL doesn&#039;t allow access from other computer.
If you try to connect with a MySQL administration client like MySQL Administrator you will get a Mysql Error Number 2003.
All this operations modify system settings, so they must be executed with root privileges
If you want connect from a computer in your LAN to your mysql [...]]]></description>
			<content:encoded><![CDATA[<p>For security reason, MySQL doesn&#039;t allow access from other computer.<br />
If you try to connect with a MySQL administration client like <a href="http://www.mysql.com/products/tools/administrator/">MySQL Administrator</a> you will get a <em>Mysql Error Number 2003</em>.</p>
<p>All this operations modify system settings, so they must be executed with root privileges</p>
<p>If you want connect from a computer in your LAN to your mysql server you have to :</p>
<h3>1) Edit your MySQL configuration file</h3>
<p><code>root@namazu:~#sudo vi /etc/mysql/my.conf</code><br />
and change the line<br />
bind-address = 127.0.0.1<br />
with<br />
bind-address = 192.168.178.100</p>
<p>Now, to apply changes you have to reload the MySQL server<br />
<code>root@namazu:~#sudo /etc/init.d/mysql start</code><br />
No MySQL listen on your external interface, to verify that the server is up and accept connection type</p>
<p><code>root@namazu:~#telnet 192.168.178.100 3306</code></p>
<p>and you should get:</p>
<p><code>Trying 192.168.178.100...<br />
Connected to 192.168.178.100.<br />
Escape character is '^]'.<br />
@<br />
5.0.75-0ubuntu10.2</code></p>
<h3>2) Give grants</h3>
<p>Now MySQL is reachable on the &#034;network&#034; level, we have to enable access to databases.</p>
<p>Let&#039;s access MySQL with the mysql client, we still use <i>localhost</i> because we don&#039;t have privileges to access MySQL from others hosts yet.</p>
<p><code>root@namazu:~#mysql -u<em>root</em> -p<em>myRootPass</em> -h localhost </p>
<p>Welcome to the MySQL monitor.  Commands end with ; or \g. Your MySQL connection id is 7 to server version: 5.0.22-Debian_0ubuntu6.06-log  Type 'help;' or '\h' for help. Type '\c' to clear the buffer.</code></p>
<p>Modify access privileges to the server</p>
<p><code>mysql&gt;GRANT ALL PRIVILEGES ON <em>DB_NAME</em> TO '<em>USERNAME</em>'@'<em>HOST</em>' IDENTIFIED BY<br />
'<em>PASSWORD</em>';</code></p>
<p><acronym title="Nota bene">N.B.</acronym> </p>
<ul>
<li>if you want to give access from any host set <em>HOST</em> to &#039;%&#039;</li>
<li>if you want to grant access to all the DBs set <em>DB_NAME</em> to *.*</li>
</ul>
<p>So, for instance, with this command :</p>
<p><code>mysql&gt;GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'foopass';</code></p>
<p>we allow root (whose pass is <i>foopass</i>) to access all databases whichever host.</p>
<p>Exit the client</p>
<p><code>mysql&gt;exit</code></p>
<p>Reload the privileges</p>
<p><code>root@namazu:~#mysqladmin reload</code></p>
<p>For more info on GRANT command: <a title="GRANT Syntax | MySQL Reference Manual" href="http://dev.mysql.com/doc/refman/5.0/en/grant.html">GRANT Syntax on MySQL Reference Manual</a></p>
<p>Have fun &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iliveinperego.com/2006/08/access-mysql-from-other-machine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
