Ubuntu ã« MySQL 㨠phpMyAdmin ãã¤ã³ã¹ãã¼ã«ãã
å
æ¥ãUbuntu 8.10 ãã¹ã¯ãããçã使ã£ã¦å®é¨ç¨ãµã¼ããç«ã¦ãã¨ãã®è¦æ¸ãã¢ãããã¦ããã
åèã«ãããUbuntuã§ä½ãLinuxãµã¼ãã¼ (æ¥çµBPãã½ã³ã³ãã¹ãã ãã¯)ãã«ã¯ MySQL 㨠phpMyAdmin ã®ã¤ã³ã¹ãã¼ã«ãè¼ã£ã¦ãªãã£ããããã¡ã¢ãæ®ãããé ¼ã¾ããã®ã§ç¡ãããªããã¡ã«ãããã¾ã§å®é¨ç¨ã¨ãããã¨ã§ã»ãã¥ãªãã£ã«é¢ãã¦ã¯å²æããã
1. Apache 㨠PHP ãã¤ã³ã¹ãã¼ã«
ãã§ã«ã¤ã³ã¹ãã¼ã«ãã¦ããå ´å㯠2. ã¸ã
$ sudo apt-get install apache2 php5 libapache2-mod-php5
2. MySQL ããã³ãã®é¢é£ããã±ã¼ã¸ãã¾ã¨ãã¦ã¤ã³ã¹ãã¼ã«ã
ã¤ãã§ã« PHP ã®ãã使ãããã±ã¼ã¸é¡ãã¾ã¨ãã¦ã¤ã³ã¹ãã¼ã«ã
$ sudo apt-get install mysql-client mysql-server php5-dev php5-cli php5-common php-pear php5-mysql php5-mcrypt php5-dev php5-mhash php5-gd php5-xsl php5-xmlrpc
æ¥ã«ãã«ã¼ã¹ã¯ãªã¼ã³ ã«ãªã£ã¦ root ã®ãã¹ã¯ã¼ããè¨å®ããããä¿ãããã®ã§ãè¨å®ãã¦ãã(åããã®ã 2 åå
¥å)ã
3. MySQL ã®åæè¨å®
root ã§ãªãä¸è¬ã¦ã¼ã¶ãä½ã£ã¦ããã
$ mysql -u root -p Enter password: (ãã¹ã¯ã¼ããå ¥å) mysql> grant all privileges on *.* to (ã¦ã¼ã¶å)@localhost identified by '(ãã¹ã¯ã¼ã)'; Query OK, 0 rows affected (0.00 sec) mysql> select user from mysql.user where user='(ã¦ã¼ã¶å)'; # ç»é²ããããã©ããç¢ºèª +------------+ | user | +------------+ | (ã¦ã¼ã¶å) | +------------+ 1 row in set (0.00 sec) mysql> exit # MySQLã®ã³ã³ã½ã¼ã«ããæãã Bye
4. phpMyAdmin ã®ãã¦ã³ãã¼ãã¨è¨ç½®
www.phpmyadmin.net ãããå®å®çã® .gz ã¢ã¼ã«ã¤ãã /var/www ã«ãã¦ã³ãã¼ãããã2009/01/19 ç¾å¨ã§ã¯ããã¼ã¸ã§ã³ 3.1.1ã
$ cd /var/www $ sudo wget http://prdownloads.sourceforge.net/phpmyadmin/phpMyAdmin-3.1.1-all-languages.tar.gz
解åãã¦ååãå¤ããã
$ sudo tar -xvzf phpMyAdmin-3.1.1-all-languages.tar.gz $ sudo mv phpMyAdmin-3.1.1-all-languages phpmyadmin
ã©ã³ãã 㪠46 æåã®æååãä½ã£ã¦ããã
$ sudo apt-get install libstring-mkpasswd-perl $ mkpasswd.pl -l 46 (ã©ã³ãã ãªæåå)
config.sample.inc.php ã config.inc.php ã«ã³ãã¼ãã¦ç·¨éã
$ cd ./phpmyadmin $ sudo cp config.sample.inc.php config.inc.php $ sudo vi config.inc.php # ä¸è¨ã®è¡ã«ã©ã³ãã ãªæååãå ¥åãã $cfg['blowfish_secret'] = ''; â $cfg['blowfish_secret'] = '(ã©ã³ãã ãªæåå)';
Web ãã©ã¦ã¶ãã http://(ãµã¼ãã®ã¢ãã¬ã¹)/phpmyadmin/ ãéãã
phpMyAdmin ã®ãã°ã¤ã³ç»é¢ãåºãã° OKã
ãã¾ããããªããã°ãApache ã®åèµ·å ($ sudo /etc/init.d/apache2 restart) ã PHP ã¢ã¸ã¥ã¼ã«ã®æå¹å ($ sudo a2enmod php5) ãªã©è¡ã£ã¦ã¿ãã¨ããã