<?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>niebegeg.net &#187; MySQL</title> <atom:link href="http://niebegeg.net/tags/mysql/feed/" rel="self" type="application/rss+xml" /><link>http://niebegeg.net</link> <description>Mein Leben im Entwicklerland</description> <lastBuildDate>Mon, 06 Feb 2012 20:30:16 +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>Drupal-Performance-Odysee mit Happy-End</title><link>http://niebegeg.net/2009/03/27/drupal-performance-odysee-mit-happy-end/</link> <comments>http://niebegeg.net/2009/03/27/drupal-performance-odysee-mit-happy-end/#comments</comments> <pubDate>Fri, 27 Mar 2009 21:05:55 +0000</pubDate> <dc:creator>Dirk Rüdiger</dc:creator> <category><![CDATA[Drupal]]></category> <category><![CDATA[Apache]]></category> <category><![CDATA[D6]]></category> <category><![CDATA[FastCGI]]></category> <category><![CDATA[Lighttd]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[Performance]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Profiling]]></category> <category><![CDATA[xdebug]]></category> <guid
isPermaLink="false"></guid> <description><![CDATA[Mit dem Update unseres Intranet-Portals von D5 auf D6 und dem gleichzeitigen Umzug der Installation von einem virtuellen Webserver (Xen+Linux) auf einen physischen Server (auch Linux, identische Hardware) handelte ich mir einen totalen Einbruch der Performance der Seite ein. Ein “normaler” Seitenaufruf dauerte ~7 Sekunden, für die Startseite (mit Panels voller Views-Blöcke) dauerte das Laden [...]]]></description> <content:encoded><![CDATA[<p>Mit dem Update unseres Intranet-Portals von D5 auf D6 und dem gleichzeitigen Umzug der Installation von einem virtuellen Webserver (Xen+Linux) auf einen physischen Server (auch Linux, identische Hardware) handelte ich mir einen totalen Einbruch der Performance der Seite ein. Ein “normaler” Seitenaufruf dauerte ~7 Sekunden, für die Startseite (mit Panels voller Views-Blöcke) dauerte das Laden ~13 Sekunden. Somit war das Intranet-Portal praktisch unbenutzbar.</p><p>Nachdem ich mich von dem schrecken erholt hatte, begann ich mit der Ursachenforschung.</p><p>Den Einstieg bekam ich mit Ingos <a
href="http://blog.windfluechter.net/index.php?/archives/320-Performance-Tweaking-with-Drupal.html">Blog-Eintrag</a>.</p><p>Von dort ging es weiter zu http://2bits.com/articles/drupal-performance-tuning-and-optimization-for-large-web-sites.html und dem sichten der extra-langen Liste nach anwendbaren Vorschlägen.</p><p>Mein erster Kandidat war die MySQL-Datenbank. Sie läuft auf dem selben Rechner wie der Web-Server also keine zu überprüfende Netzwerk-Kommunikation. Also nahm ich das <a
href="http://www.day32.com/MySQL/">tuning-primer.sh-Skript</a> und optimierte den DB-Server, so lange mir die Vorschläge plausibel erschienen und endlich alle Tests <span
style="color: green;">auf Grün standen</span>. <strong>Keine Verbesserung.</strong></p><p>Auch zeigte das <a
href="http://drupal.org/project/devel">devel.module</a>, dass nur ein Bruchteil der Ladezeit für die SQL-Queries benötigt wurde.</p><p>Als nächstes (wenige Tage später) nahm ich mir den Apache vor. Auf ihm laufen neben PHP-Skripten (drupal, phpmyadmin) auch diverse Python-Apps und ein Scalix mit Tomcat-Servlet-Connector. Ich entfernte alle Apache-Erweiterungen, die nicht unbedingt benötigt werden (z.B. <em>mod_userdir</em> und <em>mod_info</em>). Dann noch <em>.htaccess</em>-Konfigurationen in die statische Server-Konfiguration übernommen und <a
href="http://eaccelerator.net/">eaccelerator</a> installiert. <strong>Keine Verbesserung.</strong></p><p>Zwischendurch habe ich ein Benchmark eingeschoben, um von der “gefühlten” Trägheit des Servers zu vergleichbaren Werten zu kommen und vielleicht schon kleine Verbesserungen wahrnehmen zu können.</p><p>Das Ergebnis:</p><pre class="lang-bash"><code>ab -n50 -c2 -dS http://portal.firma.de/node/<span class="nu0">111</span><br />
...<br />
Connection Times <span class="br0">&#40;</span>ms<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; min &nbsp; avg &nbsp; max<br />
Connect: &nbsp; &nbsp; &nbsp; <span class="nu0">49</span> &nbsp; <span class="nu0">105</span> &nbsp; <span class="nu0">302</span><br />
Processing: <span class="nu0">11182</span> <span class="nu0">12339</span> <span class="nu0">16441</span><br />
Total: &nbsp; &nbsp; &nbsp;<span class="nu0">11231</span> <span class="nu0">12444</span> <span class="nu0">16743</span></code></pre><p>Frustrierend!</p><p>Ich hatte als nächstes den verdacht, dass der Apache (2.0.18) mit der Multifunktionalität zu kämpfen hat und nicht gleichzeitig ein guter PHP- und Servlet-Host sein kann. Außerdem wollte ich mal <em>lighttpd</em> und <em>FastCGI</em> testen, weil das bei vielen Performance-Reports als Alternative genannt wird (unabhängig von einander). So hatte ich <em>lighttpd+FastCGI</em> auf Port 81 installiert und auf die identische Code-Basis losgeschickt. Der Benchmark ergab: <strong>Keine Verbesserung</strong>.</p><p>Nun, nach ein paar weiteren Bedenk-Tagen bin ich zu der festen Überzeugung gekommen, dass das Problem im Drupal zu finden war. So habe ich nach weiterem <a
href="http://groups.drupal.org/node/20494">Literaturstudium</a> hatte ich dann den entscheidenden Tipp gefunden: http://civicactions.com/blog/2009/feb/10/profiling_drupal.</p><p>So kopierte ich die gesamte Drupal-Installation auf mein Notebook (zur Vereinfachung der ganzen Sache), installierte “xdebug“http://www.xdebug.org/, aktivierte das <a
href="http://www.xdebug.org/docs/profiler">Generieren von Profiling-Informationen</a> und installierte <a
href="http://kcachegrind.sf.net/">kcachegrind</a> (<span
class="caps">KDE</span>, Linux). Und ziemlich schnell war klar, dass der Performance-Engpass durch das Modul <a
href="http://drupal.org/project/og_content_type_admin">og_content_type_admin</a> verursacht wurde, welches in <a
href="http://api.drupal.org/api/function/hook_init">hook_init</a> jedes mal die Funktion “menu_router_rebuild” aufruft. Als ich diesen Aufruf testweise auskommentierte, <strong>hatte ich kein Performance-Problem mehr!</strong></p><p>Ein nochmaliger Benchmark lieferte überzeugende Ergebnisse:</p><pre class="lang-bash"><code><span class="re3"># ab -n50 -c2 -dS http://portal.firma.de/node/<span class="nu0">111</span></span><br />
...<br />
Connection Times <span class="br0">&#40;</span>ms<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; min &nbsp; avg &nbsp; max<br />
Connect: &nbsp; &nbsp; &nbsp; <span class="nu0">90</span> &nbsp; <span class="nu0">105</span> &nbsp; <span class="nu0">148</span><br />
Processing: &nbsp;<span class="nu0">1279</span> &nbsp;<span class="nu0">1470</span> &nbsp;<span class="nu0">2139</span><br />
Total: &nbsp; &nbsp; &nbsp; <span class="nu0">1369</span> &nbsp;<span class="nu0">1575</span> &nbsp;<span class="nu0">2287</span></code></pre><p>Mit 1,5 Sekunden Seiten-Ladezeit kann ich sehr gut leben :)</p><p>Das Problem ist <a
href="http://drupal.org/node/330135">den Entwicklern übrigens bekannt</a>, allerdings ist das Ticket geschlossen und die vorgeschlagene Lösung hat bei mir keine Verbesserung gebracht. So habe ich mich von der Funktionalität leichten Herzens getrennt.</p><p><a
href="https://dirkr.fornax.uberspace.de/wp-content/uploads/2009/03/screenshot-kcachegrind.png"><img
src="https://dirkr.fornax.uberspace.de/wp-content/uploads/2009/03/screenshot-kcachegrind-300x218.png" alt="Screenshot KCachegrind" title="Screenshot KCachegrind" width="300" height="218" class="alignleft size-medium wp-image-689" /></a></p><div
class="betterrelated"><p><strong>Ähnliche Beiträge:</strong></p><ol><li> <a
href="http://niebegeg.net/2009/12/17/suchen-auf-drupal-sites-macht-spass-mit-apache-solr/" title="Permanent link to Suchen auf Drupal-Sites macht Spaß mit Apache Solr!">Suchen auf Drupal-Sites macht Spaß mit Apache Solr!</a></li><li> <a
href="http://niebegeg.net/2008/04/02/warum-ich-mich-fuer-einen-palm-centro-entschieden-habe-und-es-wieder-tun-wuerde/" title="Permanent link to Warum ich mich für einen Palm Centro entschieden habe &#8230; und es wieder tun würde!">Warum ich mich für einen Palm Centro entschieden habe &#8230; und es wieder tun würde!</a></li><li> <a
href="http://niebegeg.net/2010/09/30/quickstart-drupal/" title="Permanent link to Quickstart Drupal">Quickstart Drupal</a></li><li> <a
href="http://niebegeg.net/2008/01/15/happy-birthday-drupal/" title="Permanent link to Happy birthday, Drupal!">Happy birthday, Drupal!</a></li><li> <a
href="http://niebegeg.net/2010/12/12/aktive-drupal-website-auf-den-pc-spiegeln/" title="Permanent link to Aktive Drupal-Website auf den PC spiegeln">Aktive Drupal-Website auf den PC spiegeln</a></li></ol></div><p><a
href="https://dirkr.fornax.uberspace.de/?flattrss_redirect&amp;id=108&amp;md5=0ec54672966041853a02f90e220628f7" title="Flattr" target="_blank"><img
src="http://niebegeg.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded> <wfw:commentRss>http://niebegeg.net/2009/03/27/drupal-performance-odysee-mit-happy-end/feed/</wfw:commentRss> <slash:comments>6</slash:comments> <atom:link rel="payment" href="https://dirkr.fornax.uberspace.de/?flattrss_redirect&amp;id=108&amp;md5=0ec54672966041853a02f90e220628f7" type="text/html" /> </item> <item><title>DBDesigner on Mandriva</title><link>http://niebegeg.net/2008/03/08/dbdesigner-on-mandriva/</link> <comments>http://niebegeg.net/2008/03/08/dbdesigner-on-mandriva/#comments</comments> <pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate> <dc:creator>Dirk Rüdiger</dc:creator> <category><![CDATA[Delphi]]></category> <category><![CDATA[GUI]]></category> <category><![CDATA[Kylix]]></category> <category><![CDATA[Modelling]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Oracle]]></category> <category><![CDATA[SQL]]></category> <guid
isPermaLink="false"></guid> <description><![CDATA[I just wanted to run DBDesigner on my mandriva linux notebook. A colleague of mine told me that it is a very productive visual Db modelling tool. So I downloaded it from http://fabforce.net/dbdesigner4/downloads.php, unpacked it and wanted to run it. But the script exited without any output. And no GUI window appeared. Running the app [...]]]></description> <content:encoded><![CDATA[<div
class="field field-type-filefield field-field-image"><div
class="field-items"><div
class="field-item odd"> <a
href="/wp-content/uploads/screenshot-dbdesigner.png" title="Screenshot of the DBDesigner" class="thickbox" rel="gallery-45"><img
src="/wp-content/uploads/screenshot-dbdesigner.png" alt="" title="Screenshot of the DBDesigner"  class="imagecache imagecache-preview" width="250" height="182" /></a></div></div></div><p>I just wanted to run DBDesigner on my mandriva linux notebook. A colleague of mine told me that it is a very productive visual Db modelling tool. So I downloaded it from <a
href="http://fabforce.net/dbdesigner4/downloads.php" title="http://fabforce.net/dbdesigner4/downloads.php">http://fabforce.net/dbdesigner4/downloads.php</a>, unpacked it and wanted to run it. But the script exited without any output. And no <span
class="caps">GUI</span> window appeared. Running the app with strace showed me somethng like</p><pre>libborqt-6.9-qt2.3.so: cannot open shared object file: No such file or directory</pre><p>what told me to care for some dynamic lib. A quick search offered a download source: <a
href="http://rpmfind.net/linux/rpm2html/search.php?query=libborqt" title="http://rpmfind.net/linux/rpm2html/search.php?query=libborqt">http://rpmfind.net/linux/rpm2html/search.php?query=libborqt</a> &#8211; I downloaded and installed it and it instantly healed my &quot;broken&quot;  DBDesigner. Now it&#8217;s running and I can start to evaluate it.</p><p>BTW: This lib is a Kylix runtime lib, that means the ap is developed in Delphi/Kylix.</p><div
class="betterrelated"><p><strong>Ähnliche Beiträge:</strong></p><ol><li> <a
href="http://niebegeg.net/2007/11/09/a-sophisticated-approach-to-evaluating-open-source-software/" title="Permanent link to A sophisticated approach to evaluating open source software">A sophisticated approach to evaluating open source software</a></li><li> <a
href="http://niebegeg.net/2008/02/15/sql-developer-your-friend-for-oracle-dbs/" title="Permanent link to SQL Developer &#8211; your friend for Oracle DBs">SQL Developer &#8211; your friend for Oracle DBs</a></li><li> <a
href="http://niebegeg.net/2008/05/05/oracle-10g-unter-mandriva-linux-installieren/" title="Permanent link to Oracle 10g unter Mandriva Linux installieren">Oracle 10g unter Mandriva Linux installieren</a></li><li> <a
href="http://niebegeg.net/2008/04/13/mandriva-linux-2008-spring-my-first-upgrade/" title="Permanent link to Mandriva Linux 2008 Spring &#8211; my first upgrade">Mandriva Linux 2008 Spring &#8211; my first upgrade</a></li><li> <a
href="http://niebegeg.net/2007/11/25/the-internet-never-forgets-and-that-is-bad/" title="Permanent link to The internet never forgets &#8230; and that is bad!">The internet never forgets &#8230; and that is bad!</a></li></ol></div><p><a
href="https://dirkr.fornax.uberspace.de/?flattrss_redirect&amp;id=45&amp;md5=901ec963d1752c0294f90d7a28de7e15" title="Flattr" target="_blank"><img
src="http://niebegeg.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded> <wfw:commentRss>http://niebegeg.net/2008/03/08/dbdesigner-on-mandriva/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <atom:link rel="payment" href="https://dirkr.fornax.uberspace.de/?flattrss_redirect&amp;id=45&amp;md5=901ec963d1752c0294f90d7a28de7e15" type="text/html" /> </item> <item><title>SQL Developer &#8211; your friend for Oracle DBs</title><link>http://niebegeg.net/2008/02/15/sql-developer-your-friend-for-oracle-dbs/</link> <comments>http://niebegeg.net/2008/02/15/sql-developer-your-friend-for-oracle-dbs/#comments</comments> <pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate> <dc:creator>Dirk Rüdiger</dc:creator> <category><![CDATA[MySQL]]></category> <category><![CDATA[Oracle]]></category> <category><![CDATA[SQL]]></category> <guid
isPermaLink="false"></guid> <description><![CDATA[Recently I wrote about a cool SQL DB client called SQL Explorer. Now a colleague of mine, who was developing against a Oracle DB presented SQL Developer. And my review reveals: It&#8217;s cool too! SQL Developer works best with Oracle DBs (who wonders? ;-). But if you provide the jdbc connector jars for MySQL or [...]]]></description> <content:encoded><![CDATA[<div
class="field field-type-filefield field-field-image"><div
class="field-items"><div
class="field-item odd"> <a
href="/wp-content/uploads/sqldeveloper.png" title="Screenshot of the SQL Developer app" class="thickbox" rel="gallery-35"><img
src="/wp-content/uploads/sqldeveloper.png" alt="" title="Screenshot of the SQL Developer app"  class="imagecache imagecache-preview" width="250" height="170" /></a></div></div></div><p>Recently I <a
href="/blog/sql-explorer-getting-familiar-with-databases">wrote about a cool <span
class="caps">SQL</span> DB client</a> called <em><span
class="caps">SQL</span> Explorer</em>. Now a colleague of mine, who was developing against a Oracle DB presented <em><span
class="caps">SQL</span> Developer</em>. And my review reveals: It&#8217;s cool too!</p><p><em><span
class="caps">SQL</span> Developer</em> works best with Oracle DBs (who wonders? ;-). But if you provide the jdbc connector jars for MySQL or MS <span
class="caps">SQL</span>, then these DBs can be accessed as well. The feature set seems to be comparable with <em><span
class="caps">SQL</span> Explorer</em>. The only caveat is, that it is a Java Swing application. So it looks and feels a bit aged.</p><p>You can get it from Oracle: <a
href="http://www.oracle.com/technology/products/database/sql_developer/index.html" title="http://www.oracle.com/technology/products/database/sql_developer/index.html">http://www.oracle.com/technology/products/database/sql_developer/index.html</a><br
/> A Oracle Technology Network (<span
class="caps">OTN</span>) account is needed for download.</p><div
class="betterrelated"><p><strong>Ähnliche Beiträge:</strong></p><ol><li> <a
href="http://niebegeg.net/2008/02/02/sql-explorer-getting-familiar-with-databases/" title="Permanent link to SQL Explorer: Getting familiar with Databases">SQL Explorer: Getting familiar with Databases</a></li><li> <a
href="http://niebegeg.net/2008/05/05/oracle-10g-unter-mandriva-linux-installieren/" title="Permanent link to Oracle 10g unter Mandriva Linux installieren">Oracle 10g unter Mandriva Linux installieren</a></li><li> <a
href="http://niebegeg.net/2007/11/25/the-internet-never-forgets-and-that-is-bad/" title="Permanent link to The internet never forgets &#8230; and that is bad!">The internet never forgets &#8230; and that is bad!</a></li><li> <a
href="http://niebegeg.net/2008/04/13/mandriva-linux-2008-spring-my-first-upgrade/" title="Permanent link to Mandriva Linux 2008 Spring &#8211; my first upgrade">Mandriva Linux 2008 Spring &#8211; my first upgrade</a></li><li> <a
href="http://niebegeg.net/2010/03/15/die-gruppenseite-der-rostocker-drupaler-zieht-um/" title="Permanent link to Die Gruppenseite der Rostocker Drupaler zieht um">Die Gruppenseite der Rostocker Drupaler zieht um</a></li></ol></div><p><a
href="https://dirkr.fornax.uberspace.de/?flattrss_redirect&amp;id=35&amp;md5=4d413063af0dad5b3241a1ae407b8877" title="Flattr" target="_blank"><img
src="http://niebegeg.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded> <wfw:commentRss>http://niebegeg.net/2008/02/15/sql-developer-your-friend-for-oracle-dbs/feed/</wfw:commentRss> <slash:comments>1</slash:comments> <atom:link rel="payment" href="https://dirkr.fornax.uberspace.de/?flattrss_redirect&amp;id=35&amp;md5=4d413063af0dad5b3241a1ae407b8877" type="text/html" /> </item> <item><title>SQL Explorer: Getting familiar with Databases</title><link>http://niebegeg.net/2008/02/02/sql-explorer-getting-familiar-with-databases/</link> <comments>http://niebegeg.net/2008/02/02/sql-explorer-getting-familiar-with-databases/#comments</comments> <pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate> <dc:creator>Dirk Rüdiger</dc:creator> <category><![CDATA[Project of the month]]></category> <category><![CDATA[Eclipse]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[Oracle]]></category> <category><![CDATA[SQL]]></category> <guid
isPermaLink="false"></guid> <description><![CDATA[Sitting in the Oracle course I get more and more in touch with SQL and its varieties Data Manipulation Language, Data Definition Language (DDL), Data Control Language (DCL) and Transaction Control Language (TCL). But its very cumbersome to use the iSQL*Plus web front-end to write and execute all the queries. So I did some research [...]]]></description> <content:encoded><![CDATA[<div
class="field field-type-filefield field-field-image"><div
class="field-items"><div
class="field-item odd"> <a
href="/wp-content/uploads/sqlexplorer.jpg" title="Screenshot of the SQL Explorer" class="thickbox" rel="gallery-32"><img
src="/wp-content/uploads/sqlexplorer.jpg" alt="" title="Screenshot of the SQL Explorer"  class="imagecache imagecache-preview" width="250" height="184" /></a></div></div></div><p>Sitting in the Oracle course I get more and more in touch with <span
class="caps">SQL</span> and its varieties <a
title="Data Manipulation Language" href="http://de.wikipedia.org/wiki/Data_Manipulation_Language">Data Manipulation Language</a>, <a
href="http://de.wikipedia.org/wiki/Data_Definition_Language" title="Data Definition Language">Data Definition Language (<span
class="caps">DDL</span>)</a>, <a
href="http://de.wikipedia.org/wiki/Data_Control_Language" title="Data Control Language">Data Control Language (<span
class="caps">DCL</span>)</a> and <a
href="http://de.wikipedia.org/wiki/Transaction_Control_Language" title="Transaction Control Language">Transaction Control Language (<span
class="caps">TCL</span>)</a>.</p><p><p>But its very cumbersome to use the <em>iSQL*Plus</em> web front-end to write and execute all the queries.</p><p>So I did some research and found <a
href="http://sourceforge.net/projects/eclipsesql"><span
class="caps">SQL</span> Explorer</a>. This is a very powerful, cross-platform and cross DB client for <span
class="caps">SQL</span> databases. Just unzip it, define the jdbc jar for your database and connect the system. Ready!</p></p><p>Its really easy to</p><ul><li>connect any database you have an <span
class="caps">JDBC</span> driver for,</li><li>traverse the database structure,</li><li>examine the contents of tables,</li><li>execute queries,</li><li>run previous queries once more,</li><li>export data into text, html or excel files,</li><li>and much more.</li></ul><p>And: Its a Eclipse <span
class="caps">RCP</span> application!</p><div
class="betterrelated"><p><strong>Ähnliche Beiträge:</strong></p><ol><li> <a
href="http://niebegeg.net/2008/02/15/sql-developer-your-friend-for-oracle-dbs/" title="Permanent link to SQL Developer &#8211; your friend for Oracle DBs">SQL Developer &#8211; your friend for Oracle DBs</a></li><li> <a
href="http://niebegeg.net/2007/12/19/obfuscate4e-at-the-eclipse-democamp-in-hamburg/" title="Permanent link to obfuscate4e at the Eclipse DemoCamp in Hamburg">obfuscate4e at the Eclipse DemoCamp in Hamburg</a></li><li> <a
href="http://niebegeg.net/2007/11/25/the-internet-never-forgets-and-that-is-bad/" title="Permanent link to The internet never forgets &#8230; and that is bad!">The internet never forgets &#8230; and that is bad!</a></li><li> <a
href="http://niebegeg.net/2008/01/05/portableapps-the-right-app-at-the-right-place/" title="Permanent link to PortableApps: The right app at the right place">PortableApps: The right app at the right place</a></li><li> <a
href="http://niebegeg.net/2008/03/02/was-ist-dein-seitwert/" title="Permanent link to Was ist Dein Seitwert?">Was ist Dein Seitwert?</a></li></ol></div><p><a
href="https://dirkr.fornax.uberspace.de/?flattrss_redirect&amp;id=32&amp;md5=025e05b3ac42ecfbcb127c8f50839c41" title="Flattr" target="_blank"><img
src="http://niebegeg.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded> <wfw:commentRss>http://niebegeg.net/2008/02/02/sql-explorer-getting-familiar-with-databases/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <atom:link rel="payment" href="https://dirkr.fornax.uberspace.de/?flattrss_redirect&amp;id=32&amp;md5=025e05b3ac42ecfbcb127c8f50839c41" type="text/html" /> </item> <item><title>Changing of the $db_prefix of the Drupal database</title><link>http://niebegeg.net/2007/12/16/changing-of-the-db_prefix-of-the-drupal-database/</link> <comments>http://niebegeg.net/2007/12/16/changing-of-the-db_prefix-of-the-drupal-database/#comments</comments> <pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate> <dc:creator>Dirk Rüdiger</dc:creator> <category><![CDATA[Drupal]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[Vim]]></category> <guid
isPermaLink="false"></guid> <description><![CDATA[Recently I had to migrate two drupal instances running on different servers into one drupal instance with exactly one MySQL database as backend. I started both installations without databse prefix (see your site&#8217;s settings.php for details). Now I had to change this. The first site should get the prefix &#8216;www_&#8217;, the second site &#8216;o4e_&#8217;. First [...]]]></description> <content:encoded><![CDATA[<p>Recently I had to migrate two drupal instances running on different servers into one drupal instance with exactly one MySQL database as backend. I started both installations without databse prefix (see your site&#8217;s settings.php for details). Now I had to change this. The first site should get the prefix &#8216;www_&#8217;, the second site &#8216;o4e_&#8217;.</p><p>First I exported both database schemas and it&#8217;s contents via <em>mysqldump</em> into files. Then I opened the files with <em>vim</em> (I cannot imagine one can live without this &quot;swiss army knife&quot; ;-)) and applied a simple substitution:</p><pre>%s;\(CREATE TABLE\|INSERT INTO\) `;&#38;amp;www_;</pre><p>and</p><pre>%s;\(CREATE TABLE\|INSERT INTO\) `;&#38;amp;o4e_;</pre><p>respectivly.</p><p>Then I imported both dump files into the new database. Everything worked fine. Until I created the first new node. I realized, that the next node id was <strong>1</strong>! After some investigatons I found the source of my trouble in the table <em>{sequences}</em>, where all counter names are prepended by the <em>$db_prefix value</em>, as this fragment of a mysqldump shows:</p><pre>INSERT INTO `tpl_sequences` (`name`, `id`) VALUES&#60;br /&#62;(&#39;tpl_users_uid&#39;, 1),&#60;br /&#62;(&#39;tpl_menu_mid&#39;, 74),&#60;br /&#62;(&#39;tpl_node_nid&#39;, 15),&#60;br /&#62;(&#39;tpl_node_revisions_vid&#39;, 15);</pre><p>After renaming the counter names everything worked well again. <br
/> And I hope I didn&#8217;t miss anything.</p><div
class="betterrelated none"><p>Keinen verwandten Inhalt Inhalt gefunden.</p></div><p><a
href="https://dirkr.fornax.uberspace.de/?flattrss_redirect&amp;id=17&amp;md5=18c6828a1d92bb91f814edd7aff5cabd" title="Flattr" target="_blank"><img
src="http://niebegeg.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded> <wfw:commentRss>http://niebegeg.net/2007/12/16/changing-of-the-db_prefix-of-the-drupal-database/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <atom:link rel="payment" href="https://dirkr.fornax.uberspace.de/?flattrss_redirect&amp;id=17&amp;md5=18c6828a1d92bb91f814edd7aff5cabd" type="text/html" /> </item> </channel> </rss>
