<?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://www.dxcode.com/archives/tag/mysql/feed" rel="self" type="application/rss+xml" />
	<link>http://www.dxcode.com</link>
	<description>個人的なメモ書き</description>
	<lastBuildDate>Sat, 06 Mar 2010 14:28:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>MySQL管理ツール phpMyAdmin</title>
		<link>http://www.dxcode.com/archives/2009/0327766.php</link>
		<comments>http://www.dxcode.com/archives/2009/0327766.php#comments</comments>
		<pubDate>Fri, 27 Mar 2009 05:31:16 +0000</pubDate>
		<dc:creator>kecha</dc:creator>
				<category><![CDATA[CentOS5]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpMyAdmin]]></category>

		<guid isPermaLink="false">http://www.dxcode.com/?p=766</guid>
		<description><![CDATA[				
				MySQLをGUI環境で操作できるPHPアプリ。SQL文を全く書けない私にでもデータベースを操作できるので、データを修正したい時など非常に重宝している。
				もちろんデータベースの作成や削除だけでは [...]]]></description>
			<content:encoded><![CDATA[				<p><img src="http://www.dxcode.com/wp-content/uploads/2009/03/phpmyadmin.png" alt="phpMyAdmin" width="335" height="204" class="attachment wp-att-767 alignright" /><br />
				MySQLをGUI環境で操作できるPHPアプリ。SQL文を全く書けない私にでもデータベースを操作できるので、データを修正したい時など非常に重宝している。</p>
				<p>もちろんデータベースの作成や削除だけではなく、インポートやエキスポート機能もあるのでデータベース関連はこのアプリさえあれば事足りる。<br />
				と言うかかなり長い間使用しているが、この4つの機能しか殆ど使用した事がない。</p>
				<p>ただ難点は<a title="phpMyAdmin - News" href="http://www.phpmyadmin.net/home_page/news.php">更新頻度が結構速い</a>のでアップデート作業が頻繁に訪れる。外部に公開しているわけではないので最新版を追いかける必要もないかもしれないが、security-fix versionとか書かれると気になりついついアップデートしてしまう。<br style="clear:both;" /></p>
				<p>因みにphpMyAdmin3.xxシリーズはPHP5.2以降及びMySQL5.0以降の環境が必要条件になっており、CentOSのデフォルトではPHPが5.1.6なのでphpMyAdminは2.xxシリーズになってしまう。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dxcode.com/archives/2009/0327766.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>リポジトリを追加 -Les RPM de Remi-</title>
		<link>http://www.dxcode.com/archives/2009/0209254.php</link>
		<comments>http://www.dxcode.com/archives/2009/0209254.php#comments</comments>
		<pubDate>Mon, 09 Feb 2009 02:09:33 +0000</pubDate>
		<dc:creator>kecha</dc:creator>
				<category><![CDATA[CentOS5]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[リポジトリ]]></category>

		<guid isPermaLink="false">http://www.dxcode.com/?p=254</guid>
		<description><![CDATA[				CentOS5.2でPHPをインストールするとPHP5.1.6がインストールされるが5.2.xxを使用したかったのでサードパーティのリポジトリを追加した。
				今回追加したのはフランスのLes RPM de  [...]]]></description>
			<content:encoded><![CDATA[				<p>CentOS5.2でPHPをインストールするとPHP5.1.6がインストールされるが5.2.xxを使用したかったのでサードパーティのリポジトリを追加した。</p>
				<p>今回追加したのはフランスの<a title="Les RPM de Remi" href="http://blog.famillecollet.com/">Les RPM de Remi</a>というところのもの。追加することによりPHPやMySQLの最新版が使用することができる。<br />
				ただ公式にサポートされたリポジトリではないので当然リスクは大きくなるが、故人鯖ゆえ第三者に迷惑がかからなければOKというスタンスで導入した。</p>
				<p>GPGキーをインポート</p>
				<blockquote><p>[root@server ~]# rpm &#8211;import http://rpms.famillecollet.com/RPM-GPG-KEY-remi</p></blockquote>
				<p>リポジトリファイルを追加</p>
				<blockquote><p>[root@server ~]# cd /etc/yum.repos.d<br />
				[root@server ~]# wget http://rpms.famillecollet.com/remi-enterprise.repo</p></blockquote>
				<p>リポジトリファイルを編集</p>
				<blockquote><p>[root@server ~]# vi /etc/yum.repos.d/remi-enterprise.repo</p></blockquote>
				<blockquote><p>[remi]<br />
				name=Les RPM de remi pour Enterpise Linux $releasever &#8211; $basearch<br />
				baseurl=http://rpms.famillecollet.com/el$releasever.$basearch/</p>
				<p>http://iut-info.univ-reims.fr/remirpms/el$releasever.$basearch/</p>
				<p>enabled=0<br />
				gpgcheck=1<br />
				gpgkey=http://rpms.famillecollet.com/RPM-GPG-KEY-remi<br />
				failovermethod=priority</p>
				<p>[remi-test]<br />
				name=Les RPM de remi en test pour Enterpise Linux $releasever &#8211; $basearch<br />
				baseurl=http://remi.collet.free.fr/rpms/test-el$releasever.$basearch/<br />
				enabled=0<br />
				gpgcheck=1<br />
				gpgkey=http://rpms.famillecollet.com/RPM-GPG-KEY-remi</p></blockquote>
				<p>常時有効にしておくのは気持ち悪いので[remi]のenabled=1をenabled=0に変更。<br />
				[remi-test]はアルファ版等のテスト用なので使用しない方がベターというか項目自体削除しておいた方がいいと思う。</p>
				<p>で実際に使用する際は下記コマンドでOK</p>
				<blockquote><p>[root@server ~]# yum &#8211;enablerepo=remi update php</p></blockquote>
				<p>ただ依存関係で躓く事も多いので実際には下記のコマンドで対応している。</p>
				<blockquote><p>[root@server ~]# yum &#8211;enablerepo=remi update</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.dxcode.com/archives/2009/0209254.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQLのチューニング</title>
		<link>http://www.dxcode.com/archives/2008/042370.php</link>
		<comments>http://www.dxcode.com/archives/2008/042370.php#comments</comments>
		<pubDate>Wed, 23 Apr 2008 03:38:33 +0000</pubDate>
		<dc:creator>kecha</dc:creator>
				<category><![CDATA[CentOS5]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[最適化]]></category>

		<guid isPermaLink="false">http://www.dxcode.com/?p=123</guid>
		<description><![CDATA[				現在使用しているテーブル数は100前後なのでチューニングする必要性はないと思うが。
				/etc/my.cnfを編集
				[mysqld]
				key_buffer_size=512MB
				ta [...]]]></description>
			<content:encoded><![CDATA[				<p>現在使用しているテーブル数は100前後なのでチューニングする必要性はないと思うが。</p>
				<p>/etc/my.cnfを編集</p>
				<blockquote><p>[mysqld]<br />
				key_buffer_size=512MB<br />
				table_cache=1024<br />
				max_allowed_packet=1MB<br />
				record_buffer=1MB<br />
				long_query_time=1<br />
				sort_buffer_size=2MB</p></blockquote>
				<p>下記記事を参考にすべて設定するとエラーが起きてMySQLが起動しなかったので上記パラメータのみ設定するようにした。<br />
				ただエラーが起きたのは私の書き方が間違っていたために発生したのかもしれない。<br />
				因みに現在当サーバにインストールされているMySQLのバージョンは5.0.22なので最新版ではないみたい。</p>
				<p>参考記事 » <a title="5分でできる、MySQLのメモリ関係のチューニング！" href="http://dsas.blog.klab.org/archives/50860867.html">5分でできる、MySQLのメモリ関係のチューニング！</a></p>
				<p>万一に備えて /etc/my.cnf の中身をメモしておく。</p>
				<p><span id="more-70"></span></p>
				<blockquote><p>[mysqld]<br />
				datadir=/var/lib/mysql<br />
				socket=/var/lib/mysql/mysql.sock<br />
				# Default to using old password format for compatibility with mysql 3.x<br />
				# clients (those using the mysqlclient10 compatibility package).<br />
				old_passwords=1<br />
				default-character-set = utf8</p>
				<p>key_buffer_size=512MB<br />
				table_cache=1024<br />
				max_allowed_packet=1MB<br />
				record_buffer=1MB<br />
				long_query_time=1<br />
				sort_buffer_size=2MB</p>
				<p>[mysql.server]<br />
				user=mysql<br />
				basedir=/var/lib</p>
				<p>[mysqld_safe]<br />
				log-error=/var/log/mysqld.log<br />
				pid-file=/var/run/mysqld/mysqld.pid</p>
				<p>[mysql]<br />
				default-character-set = utf8</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.dxcode.com/archives/2008/042370.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XREAで複数のデータベースを管理する</title>
		<link>http://www.dxcode.com/archives/2007/10148.php</link>
		<comments>http://www.dxcode.com/archives/2007/10148.php#comments</comments>
		<pubDate>Sat, 13 Oct 2007 20:10:21 +0000</pubDate>
		<dc:creator>kecha</dc:creator>
				<category><![CDATA[Xrea]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[phpMyAdmin]]></category>
		<category><![CDATA[データベース]]></category>

		<guid isPermaLink="false">http://www.dxcode.com/archives/2007/111839.php</guid>
		<description><![CDATA[				データベース管理ツール phpMyAdmin で複数のデータベースを管理するにはconfig.inc.phpを修正することにより実現可能。
				config.inc.phpはXREAの管理画面からphpMyA [...]]]></description>
			<content:encoded><![CDATA[				<p>データベース管理ツール <a href="http://www.phpmyadmin.net/home_page/index.php" title="phpMyAdmin | MySQL Database Administration Tool | www.phpmyadmin.net">phpMyAdmin</a> で複数のデータベースを管理するにはconfig.inc.phpを修正することにより実現可能。</p>
				<p>config.inc.phpは<a href="http://www.xrea.com/" title="-Free Web Hosting-">XREA</a>の管理画面からphpMyAdminをインストールするとpublic_html/log/phpmyadminにインストールされるのでそのディレクトリ内にある。<br />
				FTPでダウンロードし修正したものを上書きアップロードするだけでOK。</p>
				<p>[php gutter=false]<br />
				/*<br />
				 * 1つめのデータベース<br />
				 */<br />
				$i++;<br />
				$cfg['Servers'][$i]['auth_type'] = &#8216;config&#8217;;<br />
				$cfg['Servers'][$i]['host'] = &#8216;localhost&#8217;;<br />
				$cfg['Servers'][$i]['connect_type'] = &#8216;tcp&#8217;;<br />
				$cfg['Servers'][$i]['compress'] = false;<br />
				$cfg['Servers'][$i]['extension'] = &#8216;mysql&#8217;;<br />
				$cfg['Servers'][$i]['user']          = &#8216;ユーザ名&#8217;;<br />
				$cfg['Servers'][$i]['password']      = &#8216;パスワード&#8217;;<br />
				$cfg['Servers'][$i]['only_db']       = &#8216;データベース名&#8217;;</p>
				<p>/*<br />
				 * 2つめのデータベース<br />
				 */<br />
				$i++;<br />
				$cfg['Servers'][$i]['auth_type'] = &#8216;config&#8217;;<br />
				$cfg['Servers'][$i]['host'] = &#8216;localhost&#8217;;<br />
				$cfg['Servers'][$i]['connect_type'] = &#8216;tcp&#8217;;<br />
				$cfg['Servers'][$i]['compress'] = false;<br />
				$cfg['Servers'][$i]['extension'] = &#8216;mysql&#8217;;<br />
				$cfg['Servers'][$i]['user']          = &#8216;ユーザ名&#8217;;<br />
				$cfg['Servers'][$i]['password']      = &#8216;パスワード&#8217;;<br />
				$cfg['Servers'][$i]['only_db']       = &#8216;データベース名&#8217;;[/php]</p>
				<p>上記の２つめのデータベース以降をコピーして下にペーストしていくだけで、下記のようにphpMyAdminのトップページ右上にデータベースを選択するプルダウンメニューが出現する。</p>
				<p><img src="http://www.dxcode.com/wp-content/uploads/2009/03/xrea_phpmyadmin.gif" alt="phpMyAdminにプルダウンメニュー" width="352" height="242" class="attachment wp-att-552 " /></p>
				<p>参考記事 >> <a href="http://wordpress.xwd.jp/euc_to_utf/pma.php" title="phpMyAdminのインストール">WordPress Japan &#8211; phpMyAdminのインストール</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dxcode.com/archives/2007/10148.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
