Home > Tags > phpMyAdmin
phpMyAdmin
XREAで複数のデータベースを管理する
- 2007-10-14 (日)
- Xrea
データベース管理ツール phpMyAdmin で複数のデータベースを管理するにはconfig.inc.phpを修正することにより実現可能。
config.inc.phpはXREAの管理画面からphpMyAdminをインストールするとpublic_html/log/phpmyadminにインストールされるのでそのディレクトリ内にある。
FTPでダウンロードし修正したものを上書きアップロードするだけでOK。
/* * 1つめのデータベース */ $i++; $cfg['Servers'][$i]['auth_type'] = 'config'; $cfg['Servers'][$i]['host'] = 'localhost'; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['compress'] = false; $cfg['Servers'][$i]['extension'] = 'mysql'; $cfg['Servers'][$i]['user'] = 'ユーザ名'; $cfg['Servers'][$i]['password'] = 'パスワード'; $cfg['Servers'][$i]['only_db'] = 'データベース名'; /* * 2つめのデータベース */ $i++; $cfg['Servers'][$i]['auth_type'] = 'config'; $cfg['Servers'][$i]['host'] = 'localhost'; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['compress'] = false; $cfg['Servers'][$i]['extension'] = 'mysql'; $cfg['Servers'][$i]['user'] = 'ユーザ名'; $cfg['Servers'][$i]['password'] = 'パスワード'; $cfg['Servers'][$i]['only_db'] = 'データベース名';
上記の2つめのデータベース以降をコピーして下にペーストしていくだけで、下記のようにphpMyAdminのトップページ右上にデータベースを選択するプルダウンメニューが出現する。

Home > Tags > phpMyAdmin