<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1044353" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1044353</link>
    <description></description>
    <language>en</language>
          <item>
    <title>It looks like you are</title>
    <link>https://www.webmaster-forums.net/web-database-development/debugging-sql-database#comment-1250366</link>
    <description> &lt;p&gt;It looks like you are restarting the DB service every time you toggle logging. Is there a way to do that without a restart?&lt;/p&gt;
 </description>
     <pubDate>Mon, 28 Jun 2010 09:00:59 +0000</pubDate>
 <dc:creator>designer2handbags</dc:creator>
 <guid isPermaLink="false">comment 1250366 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>I needed a quick way to</title>
    <link>https://www.webmaster-forums.net/web-database-development/debugging-sql-database#comment-1244126</link>
    <description> &lt;p&gt;I needed a quick way to debug what PDO statements were being executed (and their parameters) by Drupal 7&#039;s DBTNG. I could have used the devel module, ...&lt;/p&gt;
 </description>
     <pubDate>Sat, 08 Aug 2009 05:58:18 +0000</pubDate>
 <dc:creator>stephan90</dc:creator>
 <guid isPermaLink="false">comment 1244126 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>A lot of useful information</title>
    <link>https://www.webmaster-forums.net/web-database-development/debugging-sql-database#comment-1244121</link>
    <description> &lt;p&gt;A lot of useful information in this post, thanks. I feel that it might even be too much for me to “digest” .&lt;/p&gt;
 </description>
     <pubDate>Sat, 08 Aug 2009 04:25:57 +0000</pubDate>
 <dc:creator>who-when-how</dc:creator>
 <guid isPermaLink="false">comment 1244121 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Testing and debugging SQL</title>
    <link>https://www.webmaster-forums.net/web-database-development/debugging-sql-database#comment-1243934</link>
    <description> &lt;p&gt;Testing and debugging SQL database-methods. After an SQL Database Method has been created.&lt;/p&gt;
 </description>
     <pubDate>Tue, 04 Aug 2009 05:53:47 +0000</pubDate>
 <dc:creator>stephan90</dc:creator>
 <guid isPermaLink="false">comment 1243934 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Well, the spam - &quot;let me get</title>
    <link>https://www.webmaster-forums.net/web-database-development/debugging-sql-database#comment-1243789</link>
    <description> &lt;p&gt;Well, the spam - &quot;let me get my link listed post&quot; was actually useful. I missed this thread when it was active. (for regular users, the post has been unpublished)&lt;/p&gt;
&lt;p&gt;I am going to look around to see if there is a way to do this run time as well for mySQL as that would be nice. With our new CMS we launched at the beginning of the year, we are doing pretty much all PDO, called from within data classes, and being able to check the actual query would be nice. However full time logging with 20+ active cevelopment sites would fill the logs quickly.&lt;/p&gt;
&lt;p&gt;Thanks for the tips Jeeves!&lt;/p&gt;
&lt;p&gt;-Greg&lt;/p&gt;
 </description>
     <pubDate>Wed, 29 Jul 2009 12:56:42 +0000</pubDate>
 <dc:creator>Greg K</dc:creator>
 <guid isPermaLink="false">comment 1243789 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>JeevesBond wrote:
My</title>
    <link>https://www.webmaster-forums.net/web-database-development/debugging-sql-database#comment-1243329</link>
    <description> &lt;p&gt;&lt;div class=&quot;quote-msg&quot;&gt;&lt;div class=&quot;quote-author&quot;&gt;&lt;em&gt;JeevesBond&lt;/em&gt; wrote:&lt;/div&gt;My methodology was to &lt;code&gt;vim /etc/init.d/postgresql-8.3&lt;/code&gt;, see what the init script was using to control the service, then do &lt;code&gt;man pg_cluster&lt;/code&gt;. After a bit of rooting around in man files I found the startup options for debugging.&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Fair enough.  Rather new to Postgres myself, and I had resorted to restarting the service whilst updating postgresql.conf, when I had to deploy it for the first time in anger.  Have been getting used to psql since then, however.  &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Interesting thread, thanks for posting it.&lt;/p&gt;
 </description>
     <pubDate>Thu, 09 Jul 2009 06:22:40 +0000</pubDate>
 <dc:creator>Abhishek Reddy</dc:creator>
 <guid isPermaLink="false">comment 1243329 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Have you always used that</title>
    <link>https://www.webmaster-forums.net/web-database-development/debugging-sql-database#comment-1243327</link>
    <description> &lt;blockquote&gt;&lt;p&gt;Have you always used that RDBMS? If not, what made you abandon MySQL?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I haven&#039;t really abandoned MySQL, but I do think of it as being a little like the Internet Explorer of the RDBMS world. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;I use Postgres mostly for Drupal development, both because the community needs testing using it and due to its closer adherence to the SQL standards. Closer adherence to the standards means I write better -- or at least more portable -- code.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;MySQL 5.1 allows you to toggle logging during runtime.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;That&#039;s interesting, I was trying to get this working using &lt;code&gt;mysqladmin&lt;/code&gt; without much luck. Think it may have been pesky Apparmour disallowing MySQL access to a log file. I&#039;ll try it again.&lt;/p&gt;
&lt;p&gt;*** EDIT ***&lt;br /&gt;
Seems 5.1 is when &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_general_log&quot;&gt;general_log&lt;/a&gt; was introduced. Am on 5.0.75 here, that&#039;s why it doesn&#039;t work.&lt;/p&gt;
&lt;p&gt;There&#039;s the &lt;code&gt;log&lt;/code&gt; variable, but that&#039;s read-only at runtime. So, to clarify are you MySQL 5.1+ people doing the following to turn on logging?&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;mysql -uroot -p&lt;br /&gt;SET general_log = ON;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
 </description>
     <pubDate>Thu, 09 Jul 2009 03:56:00 +0000</pubDate>
 <dc:creator>JeevesBond</dc:creator>
 <guid isPermaLink="false">comment 1243327 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Am I missing something,</title>
    <link>https://www.webmaster-forums.net/web-database-development/debugging-sql-database#comment-1243326</link>
    <description> &lt;blockquote&gt;&lt;p&gt;Am I missing something, Jeeves?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Nope, that&#039;s a really good idea actually. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;I&#039;ve only ever used psql for creating users, databases and fiddling with permissions. It never even occured to me that I could change the logging settings at runtime!&lt;/p&gt;
&lt;p&gt;My methodology was to &lt;code&gt;vim /etc/init.d/postgresql-8.3&lt;/code&gt;, see what the init script was using to control the service, then do &lt;code&gt;man pg_cluster&lt;/code&gt;. After a bit of rooting around in man files I found the startup options for debugging.&lt;/p&gt;
&lt;p&gt;So, as you can see, I was assuming I&#039;d have to restart the daemon to get debugging. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Thu, 09 Jul 2009 03:49:56 +0000</pubDate>
 <dc:creator>JeevesBond</dc:creator>
 <guid isPermaLink="false">comment 1243326 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Instructions for MySQL:
Copy</title>
    <link>https://www.webmaster-forums.net/web-database-development/debugging-sql-database#comment-1243325</link>
    <description> &lt;p&gt;Instructions for MySQL:&lt;/p&gt;
&lt;p&gt;Copy and paste the following to the command line:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;sudo /etc/init.d/mysql stop&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Then:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;sudo mysqld --log=/var/log/mysql.log &amp;amp;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Will start up a copy of MySQL that logs all queries to the &lt;em&gt;/var/log/mysql.log&lt;/em&gt; file.&lt;/p&gt;
&lt;p&gt;Now, to view the queries as they&#039;re being run, copy and paste this to the command line:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;tail -f /var/log/mysql.log&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
 </description>
     <pubDate>Thu, 09 Jul 2009 03:38:04 +0000</pubDate>
 <dc:creator>JeevesBond</dc:creator>
 <guid isPermaLink="false">comment 1243325 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>teammatt3 wrote:
It looks</title>
    <link>https://www.webmaster-forums.net/web-database-development/debugging-sql-database#comment-1243322</link>
    <description> &lt;p&gt;&lt;div class=&quot;quote-msg&quot;&gt;&lt;div class=&quot;quote-author&quot;&gt;&lt;em&gt;teammatt3&lt;/em&gt; wrote:&lt;/div&gt;It looks like you are restarting the DB service every time you toggle logging. Is there a way to do that without a restart?&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Good point.  I see no reason why the &lt;a href=&quot;http://www.postgresql.org/docs/8.3/static/runtime-config-logging.html&quot;&gt;logging configuration settings&lt;/a&gt; cannot be updated at runtime.&lt;/p&gt;
&lt;p&gt;You ought to be able to drop into psql as the postgres superuser and do something like this:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;# sudo -u postgres psql&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;postgres=# set log_min_messages to DEBUG2;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Am I missing something, Jeeves?&lt;/p&gt;
 </description>
     <pubDate>Wed, 08 Jul 2009 23:34:00 +0000</pubDate>
 <dc:creator>Abhishek Reddy</dc:creator>
 <guid isPermaLink="false">comment 1243322 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
