<?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>KopfPit - Weblog &#187; Datenbanken</title>
	<atom:link href="http://www.kopfpit.de/wordpress/tag/datenbanken/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kopfpit.de/wordpress</link>
	<description>Webdevelopment</description>
	<lastBuildDate>Wed, 04 Jan 2012 15:36:40 +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>Wie ich meine MySQL Datenbank zu UTF8 &#252;berredete&#8230;</title>
		<link>http://www.kopfpit.de/wordpress/2011/07/13/wie-ich-meine-mysql-datenbank-zu-utf8-uberredete/</link>
		<comments>http://www.kopfpit.de/wordpress/2011/07/13/wie-ich-meine-mysql-datenbank-zu-utf8-uberredete/#comments</comments>
		<pubDate>Wed, 13 Jul 2011 20:23:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Datenbanken]]></category>
		<category><![CDATA[Encoding]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[XAMPP]]></category>

		<guid isPermaLink="false">http://www.kopfpit.de/wordpress/?p=957</guid>
		<description><![CDATA[Also nun ist ja MySQL schon durchaus eine Weile in amerikanischer Hand und trotzdem stolpert man immer wieder mal &#252;ber diesen l&#228;stigen Latin-1 Zeichensatz. Aktuelles Problem war, dass ein eingespielter MySQL Dump einfach unversch&#228;mterweise die Umlaute nicht korrekt darstellen wollte, obwohl eigentlich alles in UTF8 war. Aber halt nur eigentlich, denn des R&#228;tsels L&#246;sung offenbarte [...]]]></description>
			<content:encoded><![CDATA[<p>Also nun ist ja MySQL schon durchaus eine Weile in amerikanischer Hand und trotzdem stolpert man immer wieder mal &#252;ber diesen l&#228;stigen Latin-1 Zeichensatz.</p>
<p>Aktuelles Problem war, dass ein eingespielter MySQL Dump einfach unversch&#228;mterweise die Umlaute nicht korrekt darstellen wollte, obwohl eigentlich alles in UTF8 war.</p>
<p>Aber halt nur eigentlich, denn des R&#228;tsels L&#246;sung offenbarte sich nach einem Blick auf die MySQL-Systemvariablen.</p>
<p><code>SHOW VARIABLES WHERE Variable_name LIKE '%character%' OR Variable_name LIKE '%collation%'</code></p>
<p><a href="http://www.kopfpit.de/wordpress/wp-content/uploads/xampp_mysql-default.png" rel="lightbox[957]"><img class="size-medium wp-image-958 alignnone" title="xampp_mysql-default" src="http://www.kopfpit.de/wordpress/wp-content/uploads/xampp_mysql-default-300x215.png" alt="" width="300" height="215" /></a></p>
<p>Da stand doch unglaublicherweise immer noch <strong>latin1</strong></p>
<p>Um dem endg&#252;ltig ein Ende zu bereiten, muss in die <strong>my.cnf</strong> folgende Konfiguration eingetragen werden und der MySQL Server neugestartet werden.</p>
<p><code><br />
[mysqld]<br />
character-set-server=utf8<br />
</code></p>
<p><a href="http://www.kopfpit.de/wordpress/wp-content/uploads/xampp_mysql-UTF8.png" rel="lightbox[957]"><img class="alignnone size-medium wp-image-959" title="xampp_mysql-UTF8" src="http://www.kopfpit.de/wordpress/wp-content/uploads/xampp_mysql-UTF8-300x230.png" alt="" width="300" height="230" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kopfpit.de/wordpress/2011/07/13/wie-ich-meine-mysql-datenbank-zu-utf8-uberredete/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Import / Export von CSV Daten</title>
		<link>http://www.kopfpit.de/wordpress/2010/12/19/mysql-import-export-von-csv-daten/</link>
		<comments>http://www.kopfpit.de/wordpress/2010/12/19/mysql-import-export-von-csv-daten/#comments</comments>
		<pubDate>Sun, 19 Dec 2010 13:00:20 +0000</pubDate>
		<dc:creator>ct</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[Datenbanken]]></category>
		<category><![CDATA[Entwicklung]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.kopfpit.de/wordpress/?p=878</guid>
		<description><![CDATA[Seit PHP 5 hat man mittels fgetcsv bzw. fputcsv die M&#246;glichkeit komfortabel Array Daten in eine CSV Datei zu schreiben bzw. zu lesen. Kommen die Daten aus einer einer MySQL Datenbank und m&#252;ssen nicht mehr aufbereitet werden kann man das auch auf Datenbankebene mit einem SELECT erledigen. SELECT * FROM `foo` INTO OUTFILE '/path/to/dump/foo.csv' FIELDS [...]]]></description>
			<content:encoded><![CDATA[<p>Seit PHP 5 hat man mittels <em><a href=" http://de3.php.net/manual/en/function.fgetcsv.php" target="_blank">fgetcsv</a></em> bzw. <em><a href="http://de3.php.net/manual/en/function.fputcsv.php" target="_blank">fputcsv</a></em> die M&#246;glichkeit komfortabel Array Daten in eine CSV Datei zu schreiben bzw. zu lesen. Kommen die Daten aus einer einer MySQL Datenbank und m&#252;ssen nicht mehr aufbereitet werden kann man das auch auf Datenbankebene mit einem <em>SELECT</em> erledigen.<br />
<code><br />
SELECT * FROM `foo` INTO OUTFILE '/path/to/dump/foo.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';<br />
</code></p>
<p>Existiert die Datei schon, kommt eine Fehler, da sie aus Sicherheitsgr&#252;nden nicht &#252;berschrieben wird.<br />
Soll der Dateiname dynamisch sein, zum Beispiel mit Timestamp, kann man das, wie <a href="http://dev.mysql.com/doc/refman/5.0/en/select.html" target="_blank">hier</a> beschrieben, mit einem <a href="http://dev.mysql.com/tech-resources/articles/4.1/prepared-statements.html" target="_blank"><em>Prepared Statement</em></a> machen.<br />
<code><br />
SELECT @export := concat("SELECT * into OUTFILE '/path/to/dump/foo", DATE_FORMAT(now(),'%Y%m%d-%H%i%s'), ".csv' FROM foo");<br />
PREPARE stmt FROM @export;<br />
EXECUTE stmt;<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kopfpit.de/wordpress/2010/12/19/mysql-import-export-von-csv-daten/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL &#8211; Dump mit korrektem Encoding</title>
		<link>http://www.kopfpit.de/wordpress/2009/04/02/mysql-dump-mit-korrektem-encoding/</link>
		<comments>http://www.kopfpit.de/wordpress/2009/04/02/mysql-dump-mit-korrektem-encoding/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 08:41:51 +0000</pubDate>
		<dc:creator>fs</dc:creator>
				<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Datenbanken]]></category>
		<category><![CDATA[Export]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.kopfpit.de/wordpress/?p=407</guid>
		<description><![CDATA[Zeichens&#228;tze, Encodings etc. sind alte, verhasste Bekannte, die einem immer mal wieder ein Bein stellen (zumindest versuchen sie&#8217;s). Um einen korrekten Dump einer Latin1-kodierten Datenbank hinzubekommen, kann man z.B. folgendes verwenden: mysqldump --default-character-set=latin1 -uuname -ppwd database &#62; destination.sql Dann sollte beim Import auch alles klappern.]]></description>
			<content:encoded><![CDATA[<p>Zeichens&#228;tze, Encodings etc. sind alte, verhasste Bekannte, die einem immer mal wieder ein Bein stellen (zumindest versuchen sie&#8217;s).</p>
<p>Um einen korrekten Dump einer Latin1-kodierten Datenbank hinzubekommen, kann man z.B. folgendes verwenden:
<pre>mysqldump --default-character-set=latin1 -uuname -ppwd database &gt; destination.sql</pre>
<p>Dann sollte beim Import auch alles klappern.</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=51321e71-8a3d-8f19-8795-058b5c726efa" /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.kopfpit.de/wordpress/2009/04/02/mysql-dump-mit-korrektem-encoding/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MySQL &#8211; Profiler</title>
		<link>http://www.kopfpit.de/wordpress/2009/02/10/mysql-profiler/</link>
		<comments>http://www.kopfpit.de/wordpress/2009/02/10/mysql-profiler/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 21:15:11 +0000</pubDate>
		<dc:creator>fs</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Datenbanken]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Profiling]]></category>

		<guid isPermaLink="false">http://www.kopfpit.de/wordpress/?p=362</guid>
		<description><![CDATA[Grade dr&#252;ber gestolpert: Jet Profiler von Polaricon. Die Freeware-Version ist etwas eingeschr&#228;nkt, man kann keine Benutzer unterscheiden und es werden leider keine Slow Queries gezeigt. Aber zum Testen und auf Dev-Maschinen sicher einen Blick wert.]]></description>
			<content:encoded><![CDATA[<p>Grade dr&#252;ber gestolpert: <a title="Jet Profiler" href="http://www.jetprofiler.com/" target="_blank">Jet Profiler</a> von Polaricon. Die Freeware-Version ist etwas eingeschr&#228;nkt, man kann keine Benutzer unterscheiden und es werden leider keine Slow Queries gezeigt. Aber zum Testen und auf Dev-Maschinen sicher einen Blick wert.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kopfpit.de/wordpress/2009/02/10/mysql-profiler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching using disk: basic

Served from: www.kopfpit.de @ 2012-02-09 00:11:45 -->
