<?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>仙人の心得 &#187; mysql</title>
	<atom:link href="http://blog.mktime.com/archive/tag/mysql/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.mktime.com</link>
	<description>修行の日々を淡々と</description>
	<lastBuildDate>Thu, 05 May 2011 07:39:25 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>mysql：configure: error: Cannot find libmysqlclient under /usr</title>
		<link>http://blog.mktime.com/archive/290.html</link>
		<comments>http://blog.mktime.com/archive/290.html#comments</comments>
		<pubDate>Mon, 07 Jun 2010 10:52:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[エラー]]></category>

		<guid isPermaLink="false">http://blog.mktime.com/?p=290</guid>
		<description><![CDATA[mysql5のconfigureで以下のようなメッセージが出るとき、 configure: error: Cannot find libmysqlclient under /usr/local. Note that the MySQL client library is not bundled anymore! かつ、アーキテクチャが64のときは./configure オプションに &#8211;with-mysql=/usr/bin/ &#8211;with-libdir=lib64 が足りない。 アーキテクチャの確認方法は uname -r]]></description>
			<content:encoded><![CDATA[<p>mysql5のconfigureで以下のようなメッセージが出るとき、</p>
<pre class="error">
configure: error: Cannot find libmysqlclient under /usr/local.
Note that the MySQL client library is not bundled anymore!
</pre>
<p>かつ、アーキテクチャが64のときは./configure オプションに<br />
 &#8211;with-mysql=/usr/bin/ &#8211;with-libdir=lib64<br />
が足りない。</p>
<p>アーキテクチャの確認方法は</p>
<div class="console">
uname -r
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.mktime.com/archive/290.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mysql：テーブルのrepair</title>
		<link>http://blog.mktime.com/archive/209.html</link>
		<comments>http://blog.mktime.com/archive/209.html#comments</comments>
		<pubDate>Wed, 15 Jul 2009 00:42:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[crash]]></category>
		<category><![CDATA[error]]></category>

		<guid isPermaLink="false">http://blog.mktime.com/?p=209</guid>
		<description><![CDATA[mysqlでこんなエラーメッセージが出てた。 Table table_name is marked as crashed and should be repaired とりあえず、エラーが出ているテーブルを調べる。 mysql> check table table_name; +&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+ &#124; Table &#124; Op &#124; Msg_type &#124; Msg_text &#124; +&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+ &#124; table_name &#124; check &#124; warning &#124; Table is marked as crashed &#124; &#124; table_name &#124; check &#124; warning &#124; 1 client is using or hasn&#8217;t closed the [...]]]></description>
			<content:encoded><![CDATA[<p>mysqlでこんなエラーメッセージが出てた。</p>
<h4>Table table_name is marked as crashed and should be repaired</h4>
<p>とりあえず、エラーが出ているテーブルを調べる。</p>
<div class="console">
mysql> check table table_name;<br />
+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
| Table      | Op    | Msg_type | Msg_text                                              |<br />
+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
| table_name | check | warning  | Table is marked as crashed                            |<br />
| table_name | check | warning  | 1 client is using or hasn&#8217;t closed the table properly |<br />
| table_name | check | error    | Record at pos: 482160 is not remove-marked            |<br />
| table_name | check | error    | record delete-link-chain corrupted                    |<br />
| table_name | check | error    | Corrupt                                               |<br />
+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+
</div>
<p>確かにテーブルにエラーがある。<br />
これを直すにはrepairコマンドを使うらしい。</p>
<div class="console">
mysql> repair table table_name;<br />
+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
| Table      | Op     | Msg_type | Msg_text                             |<br />
+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
| table_name | repair | warning  | Number of rows changed from 63 to 64 |<br />
| table_name | repair | status   | OK                                   |<br />
+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+
</div>
<p>これで直ったっぽい。<br />
どうしてこの手順で直るのかはいつか調べる。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mktime.com/archive/209.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mysql：DATETIME型とTIMESTAMP型</title>
		<link>http://blog.mktime.com/archive/196.html</link>
		<comments>http://blog.mktime.com/archive/196.html#comments</comments>
		<pubDate>Fri, 05 Jun 2009 10:22:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[datetime]]></category>
		<category><![CDATA[timestamp]]></category>

		<guid isPermaLink="false">http://blog.mktime.com/?p=196</guid>
		<description><![CDATA[DATETIME型は8バイト、TIMESTAMP型は4バイト。 サポートする日付の範囲は DATETIME： 0000年～9999年 TIMESTAMP： 1970年～2037年 4バイトくらいケチらずにDATETIME型を使うのが基本か。 TIMESTAMP型で更新日時など内部データを持つのはアリかもしれない。 けど、生年月日のようなデータ入れられない。 システムの中で何種類も日付型を使うのが面倒ならDATETIME型に統一したほうがいい。]]></description>
			<content:encoded><![CDATA[<p>DATETIME型は8バイト、TIMESTAMP型は4バイト。<br />
サポートする日付の範囲は<br />
DATETIME： 0000年～9999年<br />
TIMESTAMP： 1970年～2037年</p>
<p>4バイトくらいケチらずにDATETIME型を使うのが基本か。<br />
TIMESTAMP型で更新日時など内部データを持つのはアリかもしれない。<br />
けど、生年月日のようなデータ入れられない。<br />
システムの中で何種類も日付型を使うのが面倒ならDATETIME型に統一したほうがいい。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mktime.com/archive/196.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mysql：MySQLのバックアップとリストア</title>
		<link>http://blog.mktime.com/archive/86.html</link>
		<comments>http://blog.mktime.com/archive/86.html#comments</comments>
		<pubDate>Sun, 12 Apr 2009 12:33:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[dump]]></category>
		<category><![CDATA[バックアップ]]></category>

		<guid isPermaLink="false">http://blog.mktime.com/?p=86</guid>
		<description><![CDATA[mysqldumpでバックアップ＆リストア すべてのデータベースをdumpでバックアップ $ mysqldump -u root -p -x &#8211;all-databases > dump.sql 特定のデータベースをバックアップするときは $ mysqldump -u root -p データベース名 > dump.sql すべてのデータベースを復元するときは $ mysql -u root -p < dump.sql 特定のデータベースを復元するときは $ mysql -u root -p データベース名 < dump.sql]]></description>
			<content:encoded><![CDATA[<p>mysqldumpでバックアップ＆リストア</p>
<p>すべてのデータベースをdumpでバックアップ</p>
<div class="console">
$ mysqldump -u root -p -x &#8211;all-databases > dump.sql
</div>
<p>特定のデータベースをバックアップするときは</p>
<div class="console">
$ mysqldump -u root -p データベース名 > dump.sql
</div>
<p>すべてのデータベースを復元するときは</p>
<div class="console">
$ mysql -u root -p < dump.sql
</div>
<p>特定のデータベースを復元するときは</p>
<div class="console">
$ mysql -u root -p データベース名 < dump.sql
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.mktime.com/archive/86.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mysql：mysqlとsennaのインストール</title>
		<link>http://blog.mktime.com/archive/83.html</link>
		<comments>http://blog.mktime.com/archive/83.html#comments</comments>
		<pubDate>Sun, 12 Apr 2009 12:29:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[senna]]></category>

		<guid isPermaLink="false">http://blog.mktime.com/?p=83</guid>
		<description><![CDATA[yumで要るものを全部入れる。 yum install mecab yum install mecab-ipadic yum install senna yum install MySQL-shared yum install MySQL-client yum install MySQL-server mysql -urootでログインして、↓このように&#8221;Tritonn Project&#8221;のバージョンが表示されればOK。 mysql -Vでは表示されないので注意。 Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 2419 Server version: 5.0.51a-modified-log MySQL Community Server (GPL) (portions (c) Tritonn Project) Type 'help;' or [...]]]></description>
			<content:encoded><![CDATA[<p>yumで要るものを全部入れる。</p>
<div class="console">
yum install mecab<br />
yum install mecab-ipadic<br />
yum install senna<br />
yum install MySQL-shared<br />
yum install MySQL-client<br />
yum install MySQL-server
</div>
<p>mysql -urootでログインして、↓このように&#8221;Tritonn Project&#8221;のバージョンが表示されればOK。 mysql -Vでは表示されないので注意。</p>
<pre>
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 2419
Server version: 5.0.51a-modified-log MySQL Community Server (GPL) (portions (c) Tritonn Project)

Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
</pre>
<p>mysqlインストール後の儀式、rootのパスワードを変更する。</p>
<div class="console">
mysqladmin -u root password パスワード
</div>
<p>次にmy.cnfを設定する。<br />
/usr/share/mysql/にある雛形を使ってmy.cnfを作成する。雛形はサーバスペックにあわせて選ぶ。意味なく大きいのにしないこと。 </p>
<table class="table">
<caption> my.cnf雛形選択の目安<br />
</caption>
<tr>
<th> my-small.cnf
</th>
<td> 64Mバイト以下のメモリの小規模サーバー向け
</td>
</tr>
<tr>
<th> my-medium.cnf
</th>
<td> 32M～64Mバイトのメモリを持つMySQL専用サーバーか、128Mバイトのメモリを持つサーバー向け
</td>
</tr>
<tr>
<th> my-large.cnf
</th>
<td> 	512Mバイト程度のメモリを持ち、MySQL専用となる機械向け
</td>
</tr>
<tr>
<th> my-huge.cnf
</th>
<td> 1G～2Gバイトのメモリを持つMySQL専用サーバー向け
</td>
</tr>
<tr>
<th> my-innodb-heavy-4G.cnf
</th>
<td> 4Gバイトのメモリ、InnoDBのみ、ACID、少ない接続、大量のクエリ
</td>
</tr>
</table>
<p>/etc/my.cnfを作る</p>
<div class="console">
cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
</div>
<p>デフォルトUTF8で使うときの文字コードの設定をmy.cnfに追加する</p>
<div class="caption">/etc/my.cnf</div>
<div class="file">
[mysqld]<br />
default-character-set=utf8<br />
skip-character-set-client-handshake<br />
character-set-server = utf8<br />
collation-server = utf8_general_ci<br />
init-connect = SET NAMES utf8</p>
<p>[mysqldump]<br />
default-character-set = utf8</p>
<p>[mysql]<br />
default-character-set = utf8
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.mktime.com/archive/83.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL:auto_incrementが最大値まで達したとき</title>
		<link>http://blog.mktime.com/archive/46.html</link>
		<comments>http://blog.mktime.com/archive/46.html#comments</comments>
		<pubDate>Sun, 27 Jul 2008 14:07:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[bigint]]></category>
		<category><![CDATA[int]]></category>
		<category><![CDATA[sutoincrement]]></category>

		<guid isPermaLink="false">http://blog.mktime.com/?p=46</guid>
		<description><![CDATA[auto_incrementにしたカラムの型がintなら2147483647、bigintなら9223372036854775807がautoincrementの最大になる。 実際に最大値までauto_incrementを進めてみる。 ALTER TABLE table1 AUTO_INCREMENT= 2147483647; auto_incrementが最大値に達するともうそのテーブルには行を追加することはできなくなります。 oracleのシーケンスならCYCLEオプションがあるけどmysqlのauto_incrementにはそのような機能は無いらしい。 ではauto_incrementが最大値に達したとき、どうすればよいのか？ 単純に ALTER TABLE table1 AUTO_INCREMENT= 1; としても、table1に1より大きいキーが存在する限りauto_incrementは1に戻らない。 DELETE FROM table1; --データを全部消す。 ALTER TABLE table1 AUTO_INCREMENT= 1; ならばauto_incrementは1に戻るので、循環シーケンスと似たような動きにするにはINSERTトリガーで 1. 対象テーブルのauto_increment値が最大に達しているかチェック。最大なら2.へ 2. 対象テーブルのデータを別テーブルに退避 3. 対象テーブルのデータをDELETE 4. ALTER TABLE～でauto_incrementを初期値に設定 という流れになるけど、INSERTの度に1.のチェックを走らせるのはちょっと嫌（1/2147483647の為に余計な処理を入れたくない）。また、退避後のデータをどう扱うかも微妙（UNIONするにしても別のキーが要るし・・・）だから int autoincrementでキーの枯渇が心配ならbigint型にしたほうがよいと思う。 bigintの最大値は9223372036854775807。intの約42億倍もある。 これは1日に1億個のキーを消費しても2億年持つという計算になる。]]></description>
			<content:encoded><![CDATA[<p>auto_incrementにしたカラムの型がintなら2147483647、bigintなら9223372036854775807がautoincrementの最大になる。</p>
<p>実際に最大値までauto_incrementを進めてみる。</p>
<pre class="console">
 ALTER TABLE table1 AUTO_INCREMENT= 2147483647;
</pre>
<p>auto_incrementが最大値に達するともうそのテーブルには行を追加することはできなくなります。</p>
<p>oracleのシーケンスならCYCLEオプションがあるけどmysqlのauto_incrementにはそのような機能は無いらしい。</p>
<p>ではauto_incrementが最大値に達したとき、どうすればよいのか？</p>
<p>単純に</p>
<pre class="console">
 ALTER TABLE table1 AUTO_INCREMENT= 1;
</pre>
<p>としても、table1に1より大きいキーが存在する限りauto_incrementは1に戻らない。</p>
<pre class="console">
 DELETE FROM table1; --データを全部消す。
 ALTER TABLE table1 AUTO_INCREMENT= 1;
</pre>
<p>ならばauto_incrementは1に戻るので、循環シーケンスと似たような動きにするにはINSERTトリガーで</p>
<p>1. 対象テーブルのauto_increment値が最大に達しているかチェック。最大なら2.へ<br />
2. 対象テーブルのデータを別テーブルに退避<br />
3. 対象テーブルのデータをDELETE<br />
4. ALTER TABLE～でauto_incrementを初期値に設定</p>
<p>という流れになるけど、INSERTの度に1.のチェックを走らせるのはちょっと嫌（1/2147483647の為に余計な処理を入れたくない）。また、退避後のデータをどう扱うかも微妙（UNIONするにしても別のキーが要るし・・・）だから<br />
int autoincrementでキーの枯渇が心配ならbigint型にしたほうがよいと思う。<br />
bigintの最大値は9223372036854775807。intの約42億倍もある。<br />
これは1日に1億個のキーを消費しても2億年持つという計算になる。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mktime.com/archive/46.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MySQL：プロセスをkillする</title>
		<link>http://blog.mktime.com/archive/44.html</link>
		<comments>http://blog.mktime.com/archive/44.html#comments</comments>
		<pubDate>Sun, 27 Jul 2008 13:57:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[command]]></category>

		<guid isPermaLink="false">http://blog.mktime.com/?p=44</guid>
		<description><![CDATA[MySQLにログインして、プロセスの一覧を表示し削除したいプロセスのIDを確認する。 SHOW PROCESSLIST; IDを指定して削除する。 kill [ID];]]></description>
			<content:encoded><![CDATA[<p>MySQLにログインして、プロセスの一覧を表示し削除したいプロセスのIDを確認する。</p>
<pre class="console">
SHOW PROCESSLIST;
</pre>
<p>IDを指定して削除する。</p>
<pre class="console">
kill [ID];
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.mktime.com/archive/44.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php:Windows環境でphp.exe＋apache+MySQLの環境を作る</title>
		<link>http://blog.mktime.com/archive/29.html</link>
		<comments>http://blog.mktime.com/archive/29.html#comments</comments>
		<pubDate>Sun, 27 Jul 2008 13:31:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[pear]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[xdebug]]></category>

		<guid isPermaLink="false">http://blog.mktime.com/?p=29</guid>
		<description><![CDATA[php php.netからバイナリをダウンロードする。 インストーラでもいいけど、とりあえずzipにしとく。 解凍したらフォルダごと適当なところに移動する。（以降、仮にC:php-5.2.6-Win32に置いたと仮定して読んでください。） フォルダの中にあるphp.ini-recommendedをコピーしてphp.iniに名前を変える apache apache.orgから現在の最新版Apache2.2のWindows用インストーラをダウンロード＆実行する。 オプションは適当に選ぶ。 httpd.confに設定を追加する。 標準のパスでインストールしたなら、C:Program FilesApache Software FoundationApache2.2confに設定ファイルhttpd.confがある。 以下の設定を追記する。 LoadModule php5_module "C:php-5.2.6-Win32php5apache2_2.dll" PHPIniDir "C:php-5.2.6-Win32" AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps linux環境の&#8221;httpd configtest&#8221;に変わるコマンドは httpd.exe -t このコマンドを実行して&#8221;Syntax OK&#8221;が表示されることを確認する。 OKならapacheを再起動する。 httpd.exe -k restart 公開ディレクトリにtest用のphpファイルを置いて、phpが実行されていればOKです。 XdebugをWindows環境で使うには http://pecl4win.php.net/ext.php/php_xdebug.dll からphp_xdebug.dllをダウンロードしてエクステンションDirに保存する。 エクステンションとPEARを使う＆開発環境用にphp.iniを編集する php.ini #pearディレクトリをinlude_pathに入れる include_path = ".:C:php-5.2.6-Win32pear" #開発用にdisplay_errorsをOnにする display_errors = On #extension_dirを設定する extension_dir = "C:php-5.2.6-Win32ext" #エラーログを出力する error_log [...]]]></description>
			<content:encoded><![CDATA[<h3>php</h3>
<p>php.netからバイナリをダウンロードする。<br />
インストーラでもいいけど、とりあえずzipにしとく。</p>
<p>解凍したらフォルダごと適当なところに移動する。（以降、仮にC:php-5.2.6-Win32に置いたと仮定して読んでください。）<br />
フォルダの中にあるphp.ini-recommendedをコピーしてphp.iniに名前を変える</p>
<h3>apache</h3>
<p>apache.orgから現在の最新版Apache2.2のWindows用インストーラをダウンロード＆実行する。<br />
オプションは適当に選ぶ。</p>
<p>httpd.confに設定を追加する。<br />
標準のパスでインストールしたなら、C:Program FilesApache Software FoundationApache2.2confに設定ファイルhttpd.confがある。<br />
以下の設定を追記する。</p>
<pre class="file">
LoadModule php5_module "C:php-5.2.6-Win32php5apache2_2.dll"
PHPIniDir "C:php-5.2.6-Win32"
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
</pre>
<p>linux環境の&#8221;httpd configtest&#8221;に変わるコマンドは</p>
<pre class="console">
httpd.exe -t
</pre>
<p>このコマンドを実行して&#8221;Syntax OK&#8221;が表示されることを確認する。<br />
OKならapacheを再起動する。</p>
<pre class="console">
httpd.exe -k restart
</pre>
<p>公開ディレクトリにtest用のphpファイルを置いて、phpが実行されていればOKです。</p>
<p>XdebugをWindows環境で使うには<br />
<a href="http://pecl4win.php.net/ext.php/php_xdebug.dll">http://pecl4win.php.net/ext.php/php_xdebug.dll</a><br />
からphp_xdebug.dllをダウンロードしてエクステンションDirに保存する。</p>
<h4>エクステンションとPEARを使う＆開発環境用にphp.iniを編集する</h4>
<div class="caption">php.ini</div>
<pre class="file">
#pearディレクトリをinlude_pathに入れる
include_path = ".:C:php-5.2.6-Win32pear"

#開発用にdisplay_errorsをOnにする
display_errors = On

#extension_dirを設定する
extension_dir = "C:php-5.2.6-Win32ext"

#エラーログを出力する
error_log = php_error.log

拡張を有効にする。php_xdebug.dllも追記する。
extension=php_mbstring.dll
extension=php_pdo.dll
extension=php_pdo_mysql.dll
</pre>
<h4>PEARを使えるようにする</h4>
<p>1.go-pear.batを実行して適当に進める。<br />
2.PEAR_ENV.regをダブルクリックしてレジストリに登録する。<br />
3.環境変数pathにpear.batがあるディレクトリを追加する。<br />
4.コマンドプロンプトで &#8220;pear list&#8221;コマンドが通ればOK。<br />
5.プロクシ環境ならpear configにプロクシ設定を行う。<br />
pear config-set http_proxy プロクシサーバ名:ポート番号</p>
<h3>MySQL</h3>
<p>mysql.comからMySQL Community ServerのWindouws用Setup.exeをダウンロードします。<br />
ウィザードに従ってインストールします。<br />
インストールが終わるとそのまま設定ウィザードに続くので適当に。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mktime.com/archive/29.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

