phpMyAdmin

http://www.nw.is.kyusan-u.ac.jp/xoops/modules/bwiki/index.php?FreeBSD%2FWebServerSetup

piano:root {107} % portinstall databases/phpmyadmin

phpMyAdmin を apache から実行可能に †

まずは認証用のファイルを作る。

% sudo mkdir /usr/local/etc/www/htpasswds
% sudo htpasswd -c /usr/local/www/htpasswds/.htpasswd1 phpadminDocumentRoot

以下に置きたくないので別のディレクトリを作ってそこにファイルを格納。phpadmin はユーザ名なので適当に。パスワードはほどよく。

/usr/local/etc/www/apache22/httpd.conf に以下を追加

Alias /phpmyadmin/ /usr/local/www/phpMyAdmin/
<Directory "/usr/local/www/phpMyAdmin">
 Options none
 AllowOverride Limit
 Order Deny,Allow
 Deny from all
 Allow from .smb.net

 AuthUserFile /usr/local/www/htpasswds/.htpasswd1
 AuthName "Please Enter phpMyAdmin Username and Password"
 AuthType Basic
 Require valid-user
</Directory>

Alias 元のパス名は適当に変更したほうが良いかも。これで、http://FQDN/phpmyadmin/ で phpMyAdmin? にアクセス可能になる。要求されるユーザ名とパスワードは上で設定したもの。

MySQL Admin

WindowsマシンからリモートサーバのMySQLを操作

http://www.mysql.com/ から mysql-gui-tools-5.0-r17-win32.msi をDL&install. サーバpiano側で

mysql> SELECT host, user FROM mysql.user;
+-----------+------+
| host      | user |
+-----------+------+
| localhost | PNE  |
| localhost | bb3  |
| localhost | pne  |
| localhost | root |
| localhost | tfc  |
+-----------+------+
5 rows in set (0.00 sec)

と、リモートからのアクセスを受け付ける設定がないので、

mysql> GRANT ALL PRIVILEGES ON *.* TO root@'219.117.246.xxx' IDENTIFIED BY '***************' WITH GRANT OPTION;
Query OK, 0 rows affected (0.05 sec)

mysql> SELECT host, user FROM mysql.user;
+-----------------+------+
| host            | user |
+-----------------+------+
| 219.117.246.xxx | root |
| localhost       | PNE  |
| localhost       | bb3  |
| localhost       | pne  |
| localhost       | root |
| localhost       | tfc  |
+-----------------+------+
6 rows in set (0.00 sec)

などとする。xxxは伏せ字。

MySQL_Admin.png

http://honana.com/mysql/admin/mysqlguitools.html

MySQL-gui-tools for Windows

Windows端末からリモートでMySQLを操作する http://honana.com/mysql/admin/mysqlguitools.html mysql-gui-tools-5.0-r14-win32.msi

% mysql -u root -p

mysql> GRANT ALL PRIVILEGES ON *.* TO root@'210.255.XXX.XXX' IDENTIFIED BY 'xxxxxxxxxxxx' WITH GRANT OPTION ;
% cat /var/log/auth.log

% ps aux | grep inetd
kill -HUP 1140

MySQL-GUI-Tools

MySQL-GUI.gif
===>  mysql-client-5.0.67_1 conflicts with installed package(s):
     mysql-client-5.1.28_1

     They install files into the same place.
     Please remove them first with pkg_delete(1).
*** Error code 1 [#cd0e39f3]

Stop in /usr/ports/databases/mysql50-client.
*** Error code 1 [#s6acf2e9]

Stop in /usr/ports/databases/mysql50-client.
*** Error code 1 [#kc312967]

Stop in /usr/ports/databases/mysql-gui-tools.
*** Error code 1 [#c913e670]

Stop in /usr/ports/databases/mysql-gui-tools.
*** Error code 1 [#f085ff2e]

Stop in /usr/ports/databases/mysql-gui-tools.
===>  Cleaning for mysql-client-5.0.67_1
===>  Cleaning for mysql-gui-tools-5.0r12
--->  Installation of databases/mysql-gui-tools ended at: Tue, 28 Oct 2008  17:06:29 +0900 (consumed 00:00:05)
--->  Saving the log as '/var/log/ports/databases::mysql-gui-tools'
--->  Fresh installation of databases/mysql-gui-tools ended at: Tue, 28 Oct  2008 17:06:29 +0900 (consumed 00:02:22)
--->  ** Install tasks 1: 1 done, 0 ignored, 0 skipped and 0 failed
/usr/local/etc/pkgtools.conf:513: warning: already initialized constant  BEFOREDEINSTALL
/usr/local/etc/pkgtools.conf:517: warning: already initialized constant AFTERINSTALL
--->  Listing the results (+:done / -:ignored / *:skipped / !:failed)
       + databases/mysql-gui-tools
--->  Packages processed: 1 done, 0 ignored, 0 skipped and 0 failed
--->  Session ended at: Tue, 28 Oct 2008 17:06:41 +0900 (consumed 00:03:17)

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS