phpMyAdmin
テーマの変更
複数のサーバーを扱っていたり、本番環境と開発環境で扱っている場合によく誤操作とかしそうなので、それぞれのサーバーごとにテーマは変更しておいたほうが便利で安全です。
テーマはphpMyAdminのインストールディレクトリの配下の themes ディレクトリに配置されています。
<install_directory>/themes/<each_themes>
デフォルトテーマは config.inc.php に次の様な行を追加します。
>|php|
$cfg['ThemeDefault'] = 'xp_dirty';
||<
単一のphpMyAdminで接続先のサーバー毎にテーマを変更する
単一のphpMyAdminを使って複数のサーバーにアクセスする、ということをやっている人もいるかと思います。
で、単一のphpMyAdminを使っていながら、接続先のサーバー毎にテーマを変更する方法が公式のドキュメントで扱われてなかったり、やいろんなブログで取り上げられてなかったのでここで取り上げます。
ズバリこうやるそうです。公式サイトのwikiに書いてありました。
$i=0;
$i++;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$_COOKIE['pma_theme-' . $i] = 'big_green';$i++;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = '127.0.0.2';
$_COOKIE['pma_theme-' . $i] = 'big_blue';$i++;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = '127.0.0.3';
$_COOKIE['pma_theme-' . $i] = 'big_red';
# Needed for server base theme
$cfg['ThemePerServer'] = true;
どうやらCookieを見て判断しているみたいですね。
複数のVMで開発環境をセットアップしていたりする場合には便利ですね!
履歴
- 第 1 版kani2011-09-08 17:48:29
タグ
他の人の「phpMyAdmin」
- 西小倉パンデイロの「phpMyAdmin」西小倉事典You don't have permission to access /phpMyAdmin on this server. << と 言われたら /etc/…2010-07-24
- akkun_choiの「phpMyAdmin」akkun_choi pedia設定例 //ログインの有効時間を設定する $cfg['LoginCookieValidity'] = '18000'; // テーマを変更する $cfg['Th…2009-06-12