<?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>BOHUCO.NET &#187; mysql</title>
	<atom:link href="http://bohuco.net/blog/tag/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://bohuco.net/blog</link>
	<description>Die Sollbruchstelle des Internets.</description>
	<lastBuildDate>Thu, 02 Feb 2012 22:00:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>7 Fields Every Database Table May Need &#8230;</title>
		<link>http://bohuco.net/blog/2011/08/7-fields-every-database-table-may-need/</link>
		<comments>http://bohuco.net/blog/2011/08/7-fields-every-database-table-may-need/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 19:28:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mssql]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://bohuco.net/blog/?p=1794</guid>
		<description><![CDATA[No matter if you work with MySQL, MSSQL, PostgreSQL or another database system, there are some columns any database table most likely may need &#8230; createDate the createDate of a row is a very nice info that can be used for quick statistics, if your boss wants to know how many users on one day [...]]]></description>
			<content:encoded><![CDATA[<p>No matter if you work with MySQL, MSSQL, PostgreSQL or another database system, there are some columns any database table most likely may need &#8230;</p>
<p><span id="more-1794"></span></p>
<h2>createDate</h2>
<p>the createDate of a row is a very nice info that can be used for quick statistics, if your boss wants to know how many users on one day registered you can simple select it via SQL and group by day. you can also modify rows based on this date like: delete all users created before year 2000 or something like this &#8230; and you can use it for forensic research: &#8220;is it really possible that such a new user already wrote one million comments?&#8221;</p>
<h2>active, inactive or deleted</h2>
<p>i use often a flag like active to mark a row as &#8220;not deleted&#8221;, you can also turn it to the opposite, important is only that you don&#8217;t delete rows in your table &#8230; better you mark it as deleted and so you can use it still for statistics or reactivate it some day. if you don&#8217;t delete your rows every link to other tables will remain intact.</p>
<h2>hidden or visible</h2>
<p>it&#8217;s almost like active/inactive but a bit different, a hidden row can be active but i don&#8217;t want to show it to a frontend user, for example test records can be hidden. in your business logic you can treat a hidden row as normal but in the end don&#8217;t show it to the frontend user.</p>
<h2>status</h2>
<p>is the multi-talent of every database table, you will need it always even if you don&#8217;t know it now, in some weeks/month/years you will be so thankfull that you have it. a status col can save you many other cols like active or hidden. this col can be a set or a tiny integer field. the set is better style, the integer is better for extending status types &#8230; if you use integers then use constants in your source code or comment the int-values somewhere you easy can find it &#8230; i write it in the mysql col description. because i use int as type i usually take 0 as an &#8220;unknown&#8221; or &#8220;new&#8221; status, if a status is defined then it gets a positive or negative value &#8230; for example 1 = active, -1 inactive or 1 visible and -1 invisible.</p>
<h2>changeDate or lastModified</h2>
<p>another important date field: as the createDate you can use it for forensics (example: if a user change a password today and wrote that he can&#8217;t login since yesterday then something is strange) and statistics (example: users with status:inactive and changeDate today are all users that deactivated their accounts today) but you can also set the lastModified http header from it (google loves it) and maybe you can use it for caching or clean up caches.</p>
<h2>id</h2>
<p>surprise, surprise &#8230; really every table should have a primary key for simpler editing/deleting and fast access.</p>
<h2>description</h2>
<p>it&#8217;s not always necessary to have a description for a row, but really often. the description field is a varchar or text field for an internal notice, it won&#8217;t be shown to a frontend user. there are so many scenarios where you can need it &#8230; admins can write why the record is like it is, or it can hold a brief history of changes, or just who has changed the row. sometimes it&#8217;s abused for settings ( example: a menu-entry with description dns=1 &#8230; it means DoNotShow=1 <img src='http://bohuco.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  don&#8217;t do that please )</p>
<div style="float:right">
<script type="text/javascript">var dzone_url = 'http://bohuco.net/blog/2011/08/7-fields-every-database-table-may-need/';</script><br />
<script type="text/javascript">var dzone_title = '7 Fields Every Database Table May Need';</script><br />
<script type="text/javascript">var dzone_blurb = 'No matter if you work with MySQL, MSSQL, PostgreSQL or another database system, there are some columns any database table most likely may need ...';</script><br />
<script type="text/javascript">var dzone_style = '1';</script><br />
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div>
<p>&#8230; thats my silver bullets for database design &#8230; what do you think!</p>
]]></content:encoded>
			<wfw:commentRss>http://bohuco.net/blog/2011/08/7-fields-every-database-table-may-need/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>PHP in der Cloud: cloudControl aus Deutschland bietet PaaS für PHP</title>
		<link>http://bohuco.net/blog/2011/02/php-cloud-cloudcontrol-paas/</link>
		<comments>http://bohuco.net/blog/2011/02/php-cloud-cloudcontrol-paas/#comments</comments>
		<pubDate>Tue, 08 Feb 2011 21:11:39 +0000</pubDate>
		<dc:creator>DerFichtl</dc:creator>
				<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[mongodb]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[paas]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://bohuco.net/blog/?p=1689</guid>
		<description><![CDATA[Wer eine Webseite betreibt oder gar eine Webapplikation muss sich unweigerlich um Hosting und Server Administration kümmern. Dabei gibt es mittlerweile unendlich viele Möglichkeiten &#8230; aber jetzt kommt noch eine dazu: Platform as a Service (PaaS) Keine Hardware Investitionen, nie wieder Server administrieren oder Sicherheitspatches einspielen müssen, das System skaliert automatisch und das Deploy wird [...]]]></description>
			<content:encoded><![CDATA[<p>Wer eine Webseite betreibt oder gar eine Webapplikation muss sich unweigerlich um Hosting und Server Administration kümmern. Dabei gibt es mittlerweile unendlich viele Möglichkeiten &#8230; aber jetzt kommt noch eine dazu: <strong>Platform as a Service (PaaS)</strong></p>
<p>Keine Hardware Investitionen, nie wieder Server administrieren oder Sicherheitspatches einspielen müssen, das System skaliert automatisch und das Deploy wird einfacher: Das klingt doch alles wunderbar und das alles bietet SaaS!</p>
<p>Platform as a Service (PaaS) gibt es seit einigen Jahren für Java (<a href="http://code.google.com/appengine/">Google AppEngine</a>) oder für .NET (<a href="http://www.microsoft.com/windowsazure/">Microsoft Azure</a>) aber für PHP sieht es derzeit noch etwas mau aus. Diese Lücke möchte jetzt <a href="http://cloudcontrol.com">cloudControl</a> aus Potsdam schließen &#8230;</p>
<p><span id="more-1689"></span></p>
<p><strong>Die Features</strong></p>
<p>cloudControl ist in erster Linie eine Webserver-Plattform basierend auf Linux mit Apache und PHP, für eine funktionierende Webapplikation wird allerdings auch eine Datenbank benötigt. Derzeit stehen MongoDb und MySQL in unterschiedlichen Größen zur Auswahl. Maximal kann eine MySQL Datenbank ein Terabyte groß sein. Für MongoDb ist regulär bei 250 GB Schluss, mehr gibt&#8217;s aber anscheinend auf Anfrage.</p>
<p>Außerdem stehen noch folgende Add-ons zur Verfügung: <a href="http://memcached.org/">Memcached</a> als Caching-Layer, für das Monitoring <a href="http://www.newrelic.com/web-app-monitoring-features.html">New Relic RPM</a> und SSL. </p>
<p>Alle Plattform-Funktionen werden über das spezielle Kommandozeilen Werkzeug cctrl gesteuert. Manche Features kann man zusätzlich über die geschützte WebConsole abrufen.</p>
<p>Mit cloudControl lässt sich ein Staging-System mit beliebigen Aufbau realisieren. Jeder Stage (auch Deployment genannt) ist dabei ein eigener Branch und lässt sich mit dem Deploy-Tool separat ansprechen, ein Deploy auf den Test-Stage würde so aussehen:</p>

<div class="wp_syntax"><div class="code"><pre class="sh" style="font-family:monospace;">&nbsp;
cctrlapp bohuco/test deploy</pre></div></div>

<p>Die <a href="http://cloudcontrol.com/developers/documentation/user-management/account-management/">Benutzerverwaltung</a> wird auch über die Kommandozeile gemacht. Der Inhaber einer Applikation kann beliebige Entwickler hinzufügen und entfernen (cctrluser create / activate / delete).</p>
<p><strong>Der Preis</strong></p>
<p>cloudControl rechnet in sogenannten Boxen ab. Eine Box kann 2 PHP Requests pro Sekunde bearbeiten und ist vergleichbar mit einer viertel <a href="http://aws.amazon.com/ec2/faqs/#What_is_an_EC2_Compute_Unit_and_why_did_you_introduce_it">Amazon EC2 Compute Unit</a>. Die erste Box ist kostenlos, jede weitere kostet 0,05 EUR pro Stunde. Die Boxen werden automatisch auf die aktuellen Anforderungen skaliert bis zu einer Maximalgrenze die der Benutzer festlegen kann.</p>
<p><a href="http://bohuco.net/blog/wp-content/uploads/2011/02/Bildschirmfoto-2011-02-08-um-20.16.07.png"><img src="http://bohuco.net/blog/wp-content/uploads/2011/02/Bildschirmfoto-2011-02-08-um-20.16.07-300x208.png" alt="" title="Bildschirmfoto 2011-02-08 um 20.16.07" width="300" height="208" class="aligncenter size-medium wp-image-1690" /></a></p>
<p>Alle Features lassen sich kostenlos auf unbegrenzte Zeit testen. Dabei sind die Add-ons auf relativ enge Grenzen gesetzt, wenn man mehr braucht werden dann zusätzliche Kosten fällig die auch stündlich abgerechnet werden. Die kostenlose MySQL-DB darf zum Beispiel nur 5 Mb haben, eine MongoDB 16 Mb. </p>
<p><strong>Handling</strong></p>
<p>Die Kommunikation mit der Plattform wird über ein Kommandozeilen-Tool namens <a href="http://pypi.python.org/pypi/cctrl/1.0.0">cctrl</a> abgewickelt (in Python geschrieben ???). Das Tool ist für Windows, Mac und Linux verfügbar und die Handhabung wird in verschiedenen Tutorials beschrieben. Für die Source-Code-Versionierung wird standardmäßig <a href="http://bazaar.canonical.com/en/">Bazar</a> verwendet, man kann aber einfach beim Anlegen eines neuen Projekts Git angeben:</p>

<div class="wp_syntax"><div class="code"><pre class="sh" style="font-family:monospace;">&nbsp;
cctrlapp APP_NAME create php --repo git</pre></div></div>

<p>Mein Test-Projekt war innerhalb weniger Minuten angelegt und am Server verfügbar. Folgende Schritte waren notwendig (Mac OSX):</p>

<div class="wp_syntax"><div class="code"><pre class="sh" style="font-family:monospace;">&nbsp;
mkdir bohuco
cd bohuco
cctrlapp bohuco create php --repo git
vim index.php
git init
git add .
git commit -m &quot;initial commit&quot;
cctrlapp bohuco push
cctrlapp bohuco deploy</pre></div></div>

<p>Voilà: <a href="http://bohuco.cloudcontrolled.com/">http://bohuco.cloudcontrolled.com/</a></p>
<p>Wie man auf dem phpinfo() Screenshot sieht, ist derzeit PHP 5.3.2 installiert, APC ist aktiviert, memory_limit ist auf 128 MB, post_max_size auf 20 MB &#8230;</p>
<p> <a href="http://bohuco.net/blog/wp-content/uploads/2011/02/Bildschirmfoto-2011-02-08-um-20.56.34.png"><img src="http://bohuco.net/blog/wp-content/uploads/2011/02/Bildschirmfoto-2011-02-08-um-20.56.34-281x300.png" alt="" title="Bildschirmfoto 2011-02-08 um 20.56.34" width="281" height="300" class="aligncenter size-medium wp-image-1692" /></a></p>
<p>Gehostet wird laut Twitter-Aussage auf Amazon EC2 in Irland: &#8220;@brgmn Freut uns, dass es gefällt. Server sind zur Zeit Amazon EC2 EU Region. ^pst&#8221;. Einige Details zum technische Setup kann man in den <a href="http://cloudcontrol.com/developers/faq-en/features-and-functions/">FAQs</a> finden.</p>
<p><strong>Dokumentation und Support</strong></p>
<p>&#8230; lassen keine Wünsche offen. Support via Telefon, E-Mail, Twitter und Chat. Die Dokumentation ist umfangreich und gut gegliedert. <a href="http://cloudcontrol.com/developers/tutorial/choose-operating-system/">Tutorials</a> für unterschiedliche Betriebssysteme und sogar einen <a href="http://cloudcontrol.com/assets/downloads/cloudControl_cheatsheet.pdf">Cheet Sheet</a> für die wichtigsten Funktionen wurde erstellt.</p>
<p><a href="http://bohuco.net/blog/wp-content/uploads/2011/02/Bildschirmfoto-2011-02-08-um-21.11.35.png"><img src="http://bohuco.net/blog/wp-content/uploads/2011/02/Bildschirmfoto-2011-02-08-um-21.11.35-300x187.png" alt="" title="Bildschirmfoto 2011-02-08 um 21.11.35" width="300" height="187" class="aligncenter size-medium wp-image-1694" /></a></p>
<p><strong>Performance</strong></p>
<p>Hier die Ausgabe eines ab -n 1000 -c 10 auf meine einfache PHP-Seite. Die Seite macht nur ein echo und die Applikation ist auf eine Box begrenzt.</p>
<pre>

Server Software:
Server Hostname:        bohuco.cloudcontrolled.com
Server Port:            80

Document Path:          /
Document Length:        28 bytes

Concurrency Level:      10
Time taken for tests:   14.203 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      290000 bytes
HTML transferred:       28000 bytes
<strong>Requests per second:    70.41 [#/sec] (mean)</strong>
Time per request:       142.027 [ms] (mean)
Time per request:       14.203 [ms] (mean, across all concurrent requests)
Transfer rate:          19.94 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       53   63   5.0     62     105
Processing:    56   79  28.9     69     335
Waiting:       56   78  28.8     69     335
Total:        113  141  29.4    133     400

Percentage of the requests served within a certain time (ms)
  50%    133
  66%    140
  75%    146
  80%    152
  90%    166
  95%    187
  98%    234
  99%    295
 100%    400 (longest request)
</pre>
<p><strong>Auch Nice &#8230;</strong></p>
<p>Das Deployment ist via SFTP zugänglich:<br />
sftp://dep_id@app_name.cloudcontrolled.com/files</p>
<p>Die Log-Files lassen sich abrufen:<br />
cctrlapp bohuco/default log error</p>
<p>Es wird bald ein MySQL Admin Tool geben.</p>
<p>.htaccess ist möglich und mod_rewrite ist aktiv</p>
<p><strong>Fazit</strong></p>
<p><a href="http://cloudcontrol.com/">cloudControl</a> sieht auf den ersten Blick wunderbar aus. Wie sich die Plattform im Live-Betrieb bzw. Entwickler-Alltag verhält kann ich nach so kurzer Zeit nicht sagen. Aber das Ding ist auf jeden Fall einen zweiten Blick wert. Fast alles was ich ausprobiert habe hat auf Anhieb funktioniert (nur Apache Access Log konnte ich nicht downloaden).</p>
<p><a href="http://bohuco.net/blog/wp-content/uploads/2011/02/Bildschirmfoto-2011-02-08-um-21.44.46.png"><img src="http://bohuco.net/blog/wp-content/uploads/2011/02/Bildschirmfoto-2011-02-08-um-21.44.46-300x178.png" alt="" title="Bildschirmfoto 2011-02-08 um 21.44.46" width="300" height="178" class="aligncenter size-medium wp-image-1696" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://bohuco.net/blog/2011/02/php-cloud-cloudcontrol-paas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Hint: REPLACE / UPDATE</title>
		<link>http://bohuco.net/blog/2011/02/mysql-hint-replace-update/</link>
		<comments>http://bohuco.net/blog/2011/02/mysql-hint-replace-update/#comments</comments>
		<pubDate>Mon, 07 Feb 2011 06:38:37 +0000</pubDate>
		<dc:creator>DerFichtl</dc:creator>
				<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[hint]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://bohuco.net/blog/?p=1682</guid>
		<description><![CDATA[Replace strings with SQL in a field for all rows &#8230; &#160; UPDATE `table` SET `field` = REPLACE&#40;`field`, 'search string', 'replace with this'&#41; WHERE 1=1; via @vogrim]]></description>
			<content:encoded><![CDATA[<p>Replace strings with SQL in a field for all rows &#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">&nbsp;
<span style="color: #993333; font-weight: bold;">UPDATE</span> <span style="color: #ff0000;">`table`</span> <span style="color: #993333; font-weight: bold;">SET</span> <span style="color: #ff0000;">`field`</span> <span style="color: #66cc66;">=</span> <span style="color: #993333; font-weight: bold;">REPLACE</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">`field`</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'search string'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'replace with this'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">=</span><span style="color: #cc66cc;">1</span>;</pre></div></div>

<p>via <a href="http://twitter.com/vogrim">@vogrim</a></p>
]]></content:encoded>
			<wfw:commentRss>http://bohuco.net/blog/2011/02/mysql-hint-replace-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL/SQL: count chars in table field</title>
		<link>http://bohuco.net/blog/2010/12/mysqlsql-count-chars-in-table-field/</link>
		<comments>http://bohuco.net/blog/2010/12/mysqlsql-count-chars-in-table-field/#comments</comments>
		<pubDate>Tue, 28 Dec 2010 17:02:02 +0000</pubDate>
		<dc:creator>DerFichtl</dc:creator>
				<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[select]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://bohuco.net/blog/?p=1645</guid>
		<description><![CDATA[SELECT CHAR_LENGTH(field)-CHAR_LENGTH(REPLACE(field,&#8217;-',&#8221;)) AS count FROM table]]></description>
			<content:encoded><![CDATA[<p>SELECT <em>CHAR_LENGTH</em>(field)-<em>CHAR_LENGTH</em>(REPLACE(field,&#8217;-',&#8221;)) AS count FROM table</p>
]]></content:encoded>
			<wfw:commentRss>http://bohuco.net/blog/2010/12/mysqlsql-count-chars-in-table-field/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP 5.3 fertig!</title>
		<link>http://bohuco.net/blog/2009/06/php-5-3-fertig/</link>
		<comments>http://bohuco.net/blog/2009/06/php-5-3-fertig/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 19:31:31 +0000</pubDate>
		<dc:creator>DerFichtl</dc:creator>
				<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[garbage collector]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://bohuco.net/blog/?p=979</guid>
		<description><![CDATA[Die neue PHP Version ist nun endgültig fertig und freigegeben. Zu den neuen Funktionen gehören Closures, Funktionsobjekte und Lambda-Funktionen, die native MySQL Library, namespaces und late static binding. Aber für mich am wichtigsten sind die Performance-Verbesserungen, PHP 5.3 wird ca. 1,5x so schnell sein wie 5.2 und durch den neuen Garbage Collector deutlich weniger Speicher [...]]]></description>
			<content:encoded><![CDATA[<p>Die <a href="http://www.php.net/archive/2009.php#id2009-06-30-1">neue PHP Version</a> ist nun endgültig fertig und freigegeben. Zu den neuen Funktionen gehören Closures, Funktionsobjekte und Lambda-Funktionen, die native MySQL Library, <a href="http://at2.php.net/manual/en/language.namespaces.php">namespaces</a> und <a href="http://at2.php.net/lsb">late static binding</a>. Aber für mich am wichtigsten sind die Performance-Verbesserungen, PHP 5.3 wird ca. 1,5x so schnell sein wie 5.2 und durch den <a href="http://www.heise.de/developer/Was-aendert-sich-mit-PHP-5-3--/artikel/140003/2">neuen Garbage Collector</a> deutlich weniger Speicher verbrauchen.</p>
]]></content:encoded>
			<wfw:commentRss>http://bohuco.net/blog/2009/06/php-5-3-fertig/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Connection Error</title>
		<link>http://bohuco.net/blog/2008/07/mysql-connection-error/</link>
		<comments>http://bohuco.net/blog/2008/07/mysql-connection-error/#comments</comments>
		<pubDate>Fri, 18 Jul 2008 09:48:09 +0000</pubDate>
		<dc:creator>DerFichtl</dc:creator>
				<category><![CDATA[Bookmark]]></category>
		<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[sock]]></category>
		<category><![CDATA[socket]]></category>

		<guid isPermaLink="false">http://bohuco.net/blog/?p=269</guid>
		<description><![CDATA[Finally found the solution in the Ubuntu forums: ln -s /etc/mysql/my.cnf /etc/my.cnf Can&#8217;t connect to local MySQL server through socket &#8216;/tmp/mysql.sock&#8217; [Archive] &#8211; Ubuntu Forums. Another problem &#8230; same error in phpMyAdmin cause the default for socket is &#8220;/tmp/mysql.sock&#8221;, you have to change that in your config file (config/config.inc.php): [sourcecode language='php'] $cfg['Servers'][$i]['connect_type'] = &#8216;socket&#8217;; $cfg['Servers'][$i]['socket'] [...]]]></description>
			<content:encoded><![CDATA[<p>Finally found the solution in the Ubuntu forums:</p>
<p>ln -s /etc/mysql/my.cnf /etc/my.cnf</p>
<p><a href="http://ubuntuforums.org/archive/index.php/t-312460.html">Can&#8217;t connect to local MySQL server through socket &#8216;/tmp/mysql.sock&#8217; [Archive] &#8211; Ubuntu Forums</a>.</p>
<p>Another problem &#8230; same error in phpMyAdmin cause the default for socket is &#8220;/tmp/mysql.sock&#8221;, you have to change that in your config file (config/config.inc.php):</p>
<p>[sourcecode language='php']<br />
$cfg['Servers'][$i]['connect_type'] = &#8216;socket&#8217;;<br />
$cfg['Servers'][$i]['socket'] = &#8216;/var/run/mysqld/mysqld.sock&#8217;;<br />
[/sourcecode] </p>
]]></content:encoded>
			<wfw:commentRss>http://bohuco.net/blog/2008/07/mysql-connection-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

