I’m going to use MySQL 5 on aenea, so I thought this would be a good time to try out phpMyAdmin, to see what all the fuss is about.
First, I’ve installed and got working both Apache 2 and PHP 5, both via their respective ports.
I next installed MySQL 5 server and phpMyAdmin via their ports. I enabled MySQL by adding mysql_enable="YES" to /etc/rc.conf. I started it with /usr/local/etc/rc.d/mysql-server.sh start.
To get phpMyAdmin started, I added an alias to the /usr/local/www/phpMyAdmin folder created by the port, so requests for /phpmyadmin would resolve there. To do that was a trivial task for Alias in /usr/local/etc/apache2/httpd.conf:
# Make phpmyadmin available
Alias /phpmyadmin/ "/usr/local/www/phpMyAdmin/"
Based on the instructions in the phpMyAdmin Documentation.html file, I then edited /usr/local/www/phpMyAdmin/config.inc.php to set a few variables. I set PmaAbsoluteUri, blowfish_secret, socket, connect_type, user, and password. They are:
PmaAbsoluteUri: http://aenea/phpmyadmin/
blowfish_secret: Wouldn’t you like to know
socket: /tmp/mysql.sock (This is the UNIX socket that MySQL listens on by default
connect_type: socket
user: root (Needs to be superuser so it can do all the admin tasks I want, like create databases)
password: blank string (The root password defaults to an empty string)
After that, I navigated to http://aenea/phpmyadmin/, and got the phpMyAdmin main screen.
The first thing I did was click ‘Privileges’, then click the ‘Edit Privileges’ icon for root@localhost. In the resulting page, I changed the root password to something non-blank. After that I updated config.inc.php to reflect the new password. I simply drop root@aenea..., since I will only allow connections from localhost.