<?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:xhtml="http://www.w3.org/1999/xhtml"
>

<channel>
	<title>Aerialarts &#187; MySQL</title>
	<atom:link href="http://aerial.st/tags/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://aerial.st</link>
	<description></description>
	<lastBuildDate>Mon, 16 Jan 2012 09:56:44 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://aerial.st/tags/mysql/feed/" />
		<item>
		<title>ActiveRecord3.1/MySQLでBIGINT UNSIGNEDなid</title>
		<link>http://aerial.st/archive/2011/12/06/activerecird31-mysql2-unsigned-bigint-pk/</link>
		<comments>http://aerial.st/archive/2011/12/06/activerecird31-mysql2-unsigned-bigint-pk/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 02:44:36 +0000</pubDate>
		<dc:creator>ikm</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[ActiveRecord]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://aerial.st/?p=1184</guid>
		<description><![CDATA[ActiveRecord 3.1でMySQL2アダプタを使っている場合に、idカラム（プライマリキーのカラム）にBIGINT UNSIGNEDを使う方法。 まずCREATE TABLE時のidカラムの型を変更するために、ActiveRecordが読み込まれた直後、rakeタスク等でテーブルの作成が行われる前に次のように上書きする。 ActiveRecord::ConnectionAdapters::Mysql2Adapter::NATIVE_DATABASE_TYPES[:primary_key] = \ "BIGINT UNSIGNED DEFAULT NULL auto_increment PRIMARY KEY" あとは各マイグレーションファイルで、外部キー（*_idってやつ）のカラムの型にBIGINT UNSIGNEDを指定する。 t.column :user_id, "BIGINT UNSIGNED" これでidカラムも*_idカラムもBIGINT UNSIGNEDで作られる。 もし既存のテーブルの型を書き換えたい場合には、 change_column :users, :id, "BIGINT UNSIGNED" でいけると思う（未確認）。 ただ、BIGINT UNSIGNEDだと0から1846京まで使えるらしいので、DB単体では破綻するような気がする。 参考 How to use long id in Rails applications? &#8211; stackoverflow]]></description>
		<wfw:commentRss>http://aerial.st/archive/2011/12/06/activerecird31-mysql2-unsigned-bigint-pk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://aerial.st/archive/2011/12/06/activerecird31-mysql2-unsigned-bigint-pk/" />
	</item>
		<item>
		<title>CentOSでmysqldを自動起動する設定</title>
		<link>http://aerial.st/archive/2011/03/20/start-mysqld-automatically/</link>
		<comments>http://aerial.st/archive/2011/03/20/start-mysqld-automatically/#comments</comments>
		<pubDate>Sun, 20 Mar 2011 03:37:12 +0000</pubDate>
		<dc:creator>ikm</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[sakura]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://aerial.st/?p=981</guid>
		<description><![CDATA[このさくらのVPSサーバを再起動させた際にMySQLが自動的に立ち上がってなくて、どうやらchkconfigの設定が抜けていたようなので、下記の手順で設定した。 # cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysqld # chmod +x etc/init.d/mysqld # chkconfig --add mysqld # chkconfig mysqld on 下記のサイトを参考にした。 CentOSで自宅サーバー構築 &#8211; データベースサーバ構築（MySQL） MySQL 5.1 リファレンスマニュアル &#8211; 2.10.2.2. MySQL を自動的に起動・停止する]]></description>
		<wfw:commentRss>http://aerial.st/archive/2011/03/20/start-mysqld-automatically/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://aerial.st/archive/2011/03/20/start-mysqld-automatically/" />
	</item>
		<item>
		<title>rake db:createでキャラクタセット関連っぽいエラー</title>
		<link>http://aerial.st/archive/2009/06/14/mysql-character-set-error-when-rake-db-create/</link>
		<comments>http://aerial.st/archive/2009/06/14/mysql-character-set-error-when-rake-db-create/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 13:58:42 +0000</pubDate>
		<dc:creator>ikm</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://aerial.st/?p=466</guid>
		<description><![CDATA[MacPortsでインストールしたMySQL5を使用。 rake db:createで次のようなエラーが出た。 Couldn&#8217;t create database for {&#8220;reconnect&#8221;=>false, &#8220;encoding&#8221;=>&#8221;utf8&#8243;, &#8220;username&#8221;=>***, &#8220;adapter&#8221;=>&#8221;mysql&#8221;, &#8220;database&#8221;=>&#8221;TestApp_development&#8221;, &#8220;host&#8221;=>&#8221;localhost&#8221;, &#8220;pool&#8221;=>5, &#8220;password&#8221;=>***, &#8220;socket&#8221;=>&#8221;/opt/local/var/run/mysql5/mysqld.sock&#8221;}, charset: utf8, collation: utf8_general_ci (if you set the charset manually, make sure you have a matching collation) stick stackの記事とBACCASS Labsの記事を参考に、/etc/my.cnfを作成してデフォルトの文字セットを設定： sudo cp /opt/local/share/mysql5/mysql/my-medium.cnf /etc/my.cnf sudo mate /etc/my.cnf [client] default-character-set = utf8 [mysqld] default-character-set = utf8 collation-server=utf8_general_ci character-set-server=utf8 [mysqldump] default-character-set = utf8 [mysql] default-character-set = utf8 追記 @ 6/15 上を実行してもrake db:createに失敗してた。というかそもそもmysqldが走ってなかった！かといってsudo launchctl start org.macports.mysql5を実行しても、&#8221;なにそれ？&#8221;的なエラーが返ってきた。 仕方が無いので、MySQLを再インストール： $ sudo port uninstall -f mysql5 $ sudo port clean [...]]]></description>
		<wfw:commentRss>http://aerial.st/archive/2009/06/14/mysql-character-set-error-when-rake-db-create/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://aerial.st/archive/2009/06/14/mysql-character-set-error-when-rake-db-create/" />
	</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/


Served from: aerial.st @ 2012-02-09 02:08:44 -->
