<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>n o t e 1 9 . c o m &#187; MySql</title>
	<atom:link href="http://note19.com/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://note19.com</link>
	<description></description>
	<lastBuildDate>Fri, 03 Feb 2012 14:43:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='note19.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>n o t e 1 9 . c o m &#187; MySql</title>
		<link>http://note19.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://note19.com/osd.xml" title="n o t e 1 9 . c o m" />
	<atom:link rel='hub' href='http://note19.com/?pushpress=hub'/>
		<item>
		<title>MySQL 5.1.x, Python, OS X 10.6</title>
		<link>http://note19.com/2009/09/28/mysql-5-1-x-python-os-x/</link>
		<comments>http://note19.com/2009/09/28/mysql-5-1-x-python-os-x/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 04:01:32 +0000</pubDate>
		<dc:creator>Shahram Javey</dc:creator>
				<category><![CDATA[MySql]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://note19.com/?p=1212</guid>
		<description><![CDATA[Today I tried to get MySQL 5.1.39 (this version offers UUID_SHORT) working with Python. First you must uninstall mysql, mysqlb, and then issue the following commands:<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=note19.com&amp;blog=1100651&amp;post=1212&amp;subd=note19&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today I tried to get MySQL 5.1.39 (this version offers UUID_SHORT) working with Python. First you must uninstall mysql, mysqlb, and then issue the following commands:<br />
<pre class="brush: bash;">
$ which python
/opt/local/bin/python
$ python --version
Python 2.6.2
$ sudo port install mysql5-devel
$ sudo mysql_install_db5 --user=mysql
$ sudo /opt/local/bin/mysqld_safe5 --user=mysql&amp;
$ /opt/local/lib/mysql5/bin/mysqladmin -u root password 'new-passwd'
$ ARCHFLAGS=&quot;-arch x86_64&quot; python setup.py build
$ sudo python setup.py install
$ python
&gt;&gt;&gt; import sys
&gt;&gt;&gt; sys.path
# sys.path should print an entry with
# MySQL_python-1.2.3c1-py2.6-macosx-10.6-i386.egg'
&gt;&gt;&gt; import MySQLdb
&gt;&gt;&gt; MySQLdb.apilevel
'2.0'
&gt;&gt;&gt; 

</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/note19.wordpress.com/1212/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/note19.wordpress.com/1212/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/note19.wordpress.com/1212/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/note19.wordpress.com/1212/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/note19.wordpress.com/1212/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/note19.wordpress.com/1212/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/note19.wordpress.com/1212/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/note19.wordpress.com/1212/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/note19.wordpress.com/1212/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/note19.wordpress.com/1212/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/note19.wordpress.com/1212/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/note19.wordpress.com/1212/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/note19.wordpress.com/1212/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/note19.wordpress.com/1212/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=note19.com&amp;blog=1100651&amp;post=1212&amp;subd=note19&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://note19.com/2009/09/28/mysql-5-1-x-python-os-x/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f6955c88abe26707bceccc55642e7e58?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Shahram</media:title>
		</media:content>
	</item>
		<item>
		<title>MySQL, Python on OS X &#8211; Snow Leopard</title>
		<link>http://note19.com/2009/09/26/mysql-python-on-leopard/</link>
		<comments>http://note19.com/2009/09/26/mysql-python-on-leopard/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 23:44:32 +0000</pubDate>
		<dc:creator>Shahram Javey</dc:creator>
				<category><![CDATA[MySql]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://note19.com/?p=1194</guid>
		<description><![CDATA[I was surprised at how much time I have spent on getting MySQL and Python to work on OS X Leopard. Here are the steps that worked for me. Install MySQL using mac port. Download the latest python mysqldb, build and install it. To install latest MySQL (5.1.x) see this entry. Now let me expand [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=note19.com&amp;blog=1100651&amp;post=1194&amp;subd=note19&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was surprised at how much time I have spent on getting MySQL and Python to work on OS X Leopard. Here are the steps that worked for me.</p>
<ol>
<li>Install MySQL using mac port.</li>
<li>Download the latest python mysqldb, build and install it.</li>
</ol>
<p>To install latest MySQL (5.1.x) <a href="http://note19.com/2009/09/28/mysql-5-1-x-python-os-x/">see this entry</a>.<br />
<span id="more-1194"></span></p>
<p>Now let me expand on these steps.</p>
<p>Install MySQL using mac port:</p>
<p><pre class="brush: bash;">
$ sudo port install mysql5
Password:
---&gt;  Computing dependencies for mysql5
---&gt;  Fetching mysql5
---&gt;  Verifying checksum(s) for mysql5
---&gt;  Extracting mysql5
---&gt;  Applying patches to mysql5
---&gt;  Configuring mysql5
---&gt;  Building mysql5
---&gt;  Staging mysql5 into destroot
---&gt;  Installing mysql5 @5.0.86_0
---&gt;  Activating mysql5 @5.0.86_0
---&gt;  Cleaning mysql5</pre></p>
<p>Next install the MySQL system tables:</p>
<p><pre class="brush: bash;">
$ sudo mysql_install_db5 --user=mysql
Installing MySQL system tables...
090926  9:34:59 [Warning] Setting lower_case_table_names=2 because file system for /opt/local/var/db/mysql5/ is case insensitive
OK
Filling help tables...
090926  9:34:59 [Warning] Setting lower_case_table_names=2 because file system for /opt/local/var/db/mysql5/ is case insensitive
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/opt/local/lib/mysql5/bin/mysqladmin -u root password 'new-password'
/opt/local/lib/mysql5/bin/mysqladmin -u root -h sj.local password 'new-password'

Alternatively you can run:
/opt/local/lib/mysql5/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /opt/local ; /opt/local/lib/mysql5/bin/mysqld_safe &amp;

You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl

Please report any problems with the /opt/local/lib/mysql5/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
</pre></p>
<p>Make sure that the MySQL data folder is owned by _mysql.</p>
<p><pre class="brush: bash;">
$ cd /opt/local/var/db
$ sudo chown -R _mysql:_mysql mysql5
</pre></p>
<p>Create aliases to easily start and stop MySQL. Add these to the <code>~/.bash_profile </code> file.</p>
<p><pre class="brush: bash;">
alias mysqlstart='sudo /opt/local/bin/mysqld_safe5 --user=mysql&amp;'
alias mysqlstop='sudo /opt/local/bin/mysqladmin5 -u root -p shutdown'
</pre></p>
<p>Now start MySQL and set the root password if you wish. Try using <code>mysqlstart</code> and <code>mysqlstop</code>. Add <code>/opt/local/bin</code> to your $PATH. But you must already have done this if you&#8217;ve been using mac port.</p>
<p>Check the properties of the _mysql user:</p>
<p><pre class="brush: bash;">
$ dscacheutil -q user -a name _mysql
name: _mysql
password: *
uid: 74
gid: 74
dir: /var/empty
shell: /usr/bin/false
gecos: MySQL Server
</pre></p>
<p>If the value of the gid is not the same as the value of uid, fix it so that gid is the same as uid, e.g.</p>
<p><pre class="brush: bash;">
$ dscl . -change /Users/_mysql PrimaryGroupID xx 74
</pre></p>
<p>Check to see the folder where the sockets are kept:</p>
<p><pre class="brush: bash;">
$ mysql_config5 --socket
/opt/local/var/run/mysql5/mysqld.sock
</pre></p>
<p>If you use the GUI installer for MySQL, the sockets are kept in /tmp. So if you use the MySQL GUI Query Browser or Administrator make sure that you set the location of the socket. Here is a screenshot:</p>
<div id="attachment_1198" class="wp-caption aligncenter" style="width: 310px"><a href="http://note19.files.wordpress.com/2009/09/preferences.png"><img class="size-medium wp-image-1198 " title="Preferences" src="http://note19.files.wordpress.com/2009/09/preferences.png?w=300&#038;h=233" alt="Setting MySQL socket location" width="300" height="233" /></a><p class="wp-caption-text">Setting MySQL socket location</p></div>
<p>OK, now you&#8217;re ready to install the MySQL Python connector. Download the <a href="http://sourceforge.net/projects/mysql-python/files/">latest</a> version (1.2.3.c1).  Check out this site for the excellent <a href="http://blog.some-abstract-type.com/2009/09/mysql-python-and-mac-os-x-106-snow.html">instructions</a>, repeated next.</p>
<p>Build the connector:</p>
<p><pre class="brush: bash;">
$ ARCHFLAGS=&quot;-arch x86_64&quot; /usr/bin/python setup.py build
running build
running build_py
copying MySQLdb/release.py -&gt; build/lib.macosx-10.6-universal-2.6/MySQLdb
running build_ext
</pre></p>
<p>Now install the connector:</p>
<p><pre class="brush: bash;">
$ sudo /usr/bin/python setup.py install
Password:
running install
running bdist_egg
running egg_info
writing MySQL_python.egg-info/PKG-INFO
writing top-level names to MySQL_python.egg-info/top_level.txt
writing dependency_links to MySQL_python.egg-info/dependency_links.txt
reading manifest file 'MySQL_python.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'MySQL_python.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.6-universal/egg
running install_lib
running build_py
copying MySQLdb/release.py -&gt; build/lib.macosx-10.6-universal-2.6/MySQLdb
running build_ext
creating build/bdist.macosx-10.6-universal/egg
copying build/lib.macosx-10.6-universal-2.6/_mysql.so -&gt; build/bdist.macosx-10.6-universal/egg
copying build/lib.macosx-10.6-universal-2.6/_mysql_exceptions.py -&gt; build/bdist.macosx-10.6-universal/egg
creating build/bdist.macosx-10.6-universal/egg/MySQLdb
copying build/lib.macosx-10.6-universal-2.6/MySQLdb/__init__.py -&gt; build/bdist.macosx-10.6-universal/egg/MySQLdb
copying build/lib.macosx-10.6-universal-2.6/MySQLdb/connections.py -&gt; build/bdist.macosx-10.6-universal/egg/MySQLdb
creating build/bdist.macosx-10.6-universal/egg/MySQLdb/constants
copying build/lib.macosx-10.6-universal-2.6/MySQLdb/constants/__init__.py -&gt; build/bdist.macosx-10.6-universal/egg/MySQLdb/constants
copying build/lib.macosx-10.6-universal-2.6/MySQLdb/constants/CLIENT.py -&gt; build/bdist.macosx-10.6-universal/egg/MySQLdb/constants
copying build/lib.macosx-10.6-universal-2.6/MySQLdb/constants/CR.py -&gt; build/bdist.macosx-10.6-universal/egg/MySQLdb/constants
copying build/lib.macosx-10.6-universal-2.6/MySQLdb/constants/ER.py -&gt; build/bdist.macosx-10.6-universal/egg/MySQLdb/constants
copying build/lib.macosx-10.6-universal-2.6/MySQLdb/constants/FIELD_TYPE.py -&gt; build/bdist.macosx-10.6-universal/egg/MySQLdb/constants
copying build/lib.macosx-10.6-universal-2.6/MySQLdb/constants/FLAG.py -&gt; build/bdist.macosx-10.6-universal/egg/MySQLdb/constants
copying build/lib.macosx-10.6-universal-2.6/MySQLdb/constants/REFRESH.py -&gt; build/bdist.macosx-10.6-universal/egg/MySQLdb/constants
copying build/lib.macosx-10.6-universal-2.6/MySQLdb/converters.py -&gt; build/bdist.macosx-10.6-universal/egg/MySQLdb
copying build/lib.macosx-10.6-universal-2.6/MySQLdb/cursors.py -&gt; build/bdist.macosx-10.6-universal/egg/MySQLdb
copying build/lib.macosx-10.6-universal-2.6/MySQLdb/release.py -&gt; build/bdist.macosx-10.6-universal/egg/MySQLdb
copying build/lib.macosx-10.6-universal-2.6/MySQLdb/times.py -&gt; build/bdist.macosx-10.6-universal/egg/MySQLdb
byte-compiling build/bdist.macosx-10.6-universal/egg/_mysql_exceptions.py to _mysql_exceptions.pyc
byte-compiling build/bdist.macosx-10.6-universal/egg/MySQLdb/__init__.py to __init__.pyc
byte-compiling build/bdist.macosx-10.6-universal/egg/MySQLdb/connections.py to connections.pyc
byte-compiling build/bdist.macosx-10.6-universal/egg/MySQLdb/constants/__init__.py to __init__.pyc
byte-compiling build/bdist.macosx-10.6-universal/egg/MySQLdb/constants/CLIENT.py to CLIENT.pyc
byte-compiling build/bdist.macosx-10.6-universal/egg/MySQLdb/constants/CR.py to CR.pyc
byte-compiling build/bdist.macosx-10.6-universal/egg/MySQLdb/constants/ER.py to ER.pyc
byte-compiling build/bdist.macosx-10.6-universal/egg/MySQLdb/constants/FIELD_TYPE.py to FIELD_TYPE.pyc
byte-compiling build/bdist.macosx-10.6-universal/egg/MySQLdb/constants/FLAG.py to FLAG.pyc
byte-compiling build/bdist.macosx-10.6-universal/egg/MySQLdb/constants/REFRESH.py to REFRESH.pyc
byte-compiling build/bdist.macosx-10.6-universal/egg/MySQLdb/converters.py to converters.pyc
byte-compiling build/bdist.macosx-10.6-universal/egg/MySQLdb/cursors.py to cursors.pyc
byte-compiling build/bdist.macosx-10.6-universal/egg/MySQLdb/release.py to release.pyc
byte-compiling build/bdist.macosx-10.6-universal/egg/MySQLdb/times.py to times.pyc
creating stub loader for _mysql.so
byte-compiling build/bdist.macosx-10.6-universal/egg/_mysql.py to _mysql.pyc
creating build/bdist.macosx-10.6-universal/egg/EGG-INFO
copying MySQL_python.egg-info/PKG-INFO -&gt; build/bdist.macosx-10.6-universal/egg/EGG-INFO
copying MySQL_python.egg-info/SOURCES.txt -&gt; build/bdist.macosx-10.6-universal/egg/EGG-INFO
copying MySQL_python.egg-info/dependency_links.txt -&gt; build/bdist.macosx-10.6-universal/egg/EGG-INFO
copying MySQL_python.egg-info/top_level.txt -&gt; build/bdist.macosx-10.6-universal/egg/EGG-INFO
writing build/bdist.macosx-10.6-universal/egg/EGG-INFO/native_libs.txt
zip_safe flag not set; analyzing archive contents...
creating 'dist/MySQL_python-1.2.3c1-py2.6-macosx-10.6-universal.egg' and adding 'build/bdist.macosx-10.6-universal/egg' to it
removing 'build/bdist.macosx-10.6-universal/egg' (and everything under it)
Processing MySQL_python-1.2.3c1-py2.6-macosx-10.6-universal.egg
Removing /Library/Python/2.6/site-packages/MySQL_python-1.2.3c1-py2.6-macosx-10.6-universal.egg
Copying MySQL_python-1.2.3c1-py2.6-macosx-10.6-universal.egg to /Library/Python/2.6/site-packages
MySQL-python 1.2.3c1 is already the active version in easy-install.pth

Installed /Library/Python/2.6/site-packages/MySQL_python-1.2.3c1-py2.6-macosx-10.6-universal.egg
Processing dependencies for MySQL-python==1.2.3c1
Finished processing dependencies for MySQL-python==1.2.3c1
</pre></p>
<p>You should now be ready to try out Python with MySQL:</p>
<p><pre class="brush: bash;">
$ python
Python 2.6.2 (r262:71600, Sep 26 2009, 14:46:18)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
&gt;&gt;&gt; import MySQLdb
&gt;&gt;&gt;
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/note19.wordpress.com/1194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/note19.wordpress.com/1194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/note19.wordpress.com/1194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/note19.wordpress.com/1194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/note19.wordpress.com/1194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/note19.wordpress.com/1194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/note19.wordpress.com/1194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/note19.wordpress.com/1194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/note19.wordpress.com/1194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/note19.wordpress.com/1194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/note19.wordpress.com/1194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/note19.wordpress.com/1194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/note19.wordpress.com/1194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/note19.wordpress.com/1194/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=note19.com&amp;blog=1100651&amp;post=1194&amp;subd=note19&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://note19.com/2009/09/26/mysql-python-on-leopard/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f6955c88abe26707bceccc55642e7e58?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Shahram</media:title>
		</media:content>

		<media:content url="http://note19.files.wordpress.com/2009/09/preferences.png?w=300" medium="image">
			<media:title type="html">Preferences</media:title>
		</media:content>
	</item>
		<item>
		<title>How to log MySQL queries on OS X</title>
		<link>http://note19.com/2008/07/30/how-to-log-mysql-queries-on-os-xwhenyou/</link>
		<comments>http://note19.com/2008/07/30/how-to-log-mysql-queries-on-os-xwhenyou/#comments</comments>
		<pubDate>Wed, 30 Jul 2008 04:35:08 +0000</pubDate>
		<dc:creator>Shahram Javey</dc:creator>
				<category><![CDATA[MySql]]></category>
		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://note19.wordpress.com/?p=356</guid>
		<description><![CDATA[The default MySQL installer for OS X also includes a startup item that is added to the Mac System Properties thru which you start and stop MySQL. For development purposes, I needed to be able to tail the query log. According to the documentation, you can pass &#8211;log=path-to-log-file to the startup script, or add a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=note19.com&amp;blog=1100651&amp;post=356&amp;subd=note19&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The default MySQL installer for OS X also includes a startup item that is added to the Mac System Properties thru which you start and stop MySQL. For development purposes, I needed to be able to tail the query log. According to the documentation, you can pass &#8211;log=path-to-log-file to the startup script, or add a log entry to the [mysqld] section of /etc/my.cnf file. The latter is the easiest way of creating a query log on OS X. Here are the steps that you need to follow:</p>
<ol>
<li>Create the file /etc/my.cnf (if you already don&#8217;t have one) and add the following lines:<br />
[mysqld]<br />
log=/var/log/mysqld.log</li>
<li>su (become root)</li>
<li>cd /var/log</li>
<li>touch mysqld.log</li>
<li>chmod 777 /var/log/mysqld.log</li>
<li>Restart MySQL</li>
</ol>
<div>Now you should be able to tail -f /var/log/mysqld.log</div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/note19.wordpress.com/356/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/note19.wordpress.com/356/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/note19.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/note19.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/note19.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/note19.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/note19.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/note19.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/note19.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/note19.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/note19.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/note19.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/note19.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/note19.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/note19.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/note19.wordpress.com/356/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=note19.com&amp;blog=1100651&amp;post=356&amp;subd=note19&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://note19.com/2008/07/30/how-to-log-mysql-queries-on-os-xwhenyou/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f6955c88abe26707bceccc55642e7e58?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Shahram</media:title>
		</media:content>
	</item>
		<item>
		<title>JDBC Query Logging Parameters</title>
		<link>http://note19.com/2008/02/16/jdbc-query-logging-parameters/</link>
		<comments>http://note19.com/2008/02/16/jdbc-query-logging-parameters/#comments</comments>
		<pubDate>Sat, 16 Feb 2008 21:54:51 +0000</pubDate>
		<dc:creator>Shahram Javey</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[MySql]]></category>

		<guid isPermaLink="false">http://note19.wordpress.com/?p=332</guid>
		<description><![CDATA[Every once in while I need to log slow queries using the JDBC logging parameters and it always takes me a while to find this information. So here it is (line breaks for readability): ?profileSQL=true&#38; slowQueryThresholdMillis=100&#38; autoSlowLog=true&#38; explainSlowQueries=true&#38; gatherPrefMetrics=true&#38; logSlowQueries=true Simply add the above parameters to your JDBC connection string.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=note19.com&amp;blog=1100651&amp;post=332&amp;subd=note19&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Every once in while I need to log slow queries using the JDBC logging <a href="http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-configuration-properties.html">parameters</a> and it always takes me a while to find this information. So here it is (line breaks for readability):</p>
<pre><code>
?profileSQL=true&amp;
slowQueryThresholdMillis=100&amp;
autoSlowLog=true&amp;
explainSlowQueries=true&amp;
gatherPrefMetrics=true&amp;
logSlowQueries=true
</code></pre>
<p>Simply add the above parameters to your JDBC connection string.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/note19.wordpress.com/332/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/note19.wordpress.com/332/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/note19.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/note19.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/note19.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/note19.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/note19.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/note19.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/note19.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/note19.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/note19.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/note19.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/note19.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/note19.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/note19.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/note19.wordpress.com/332/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=note19.com&amp;blog=1100651&amp;post=332&amp;subd=note19&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://note19.com/2008/02/16/jdbc-query-logging-parameters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f6955c88abe26707bceccc55642e7e58?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Shahram</media:title>
		</media:content>
	</item>
	</channel>
</rss>
