freebsdrocks.net was started originally as nospam.mine.nu.
To install phpmyadmin, run the following commands
Leave everything checked other than Improved MySQL support and tab down to OK.
# cd /usr/ports/databases/phpmyadmin
# make install clean
Before we continue rainloop will add some apache modules so we should restart apache:
Now you must configure your installation.
# /usr/local/etc/rc.d/apache24 restart
Now to edit the /usr/local/etc/apache24/httpd.conf file:
# cd /usr/local/www/phpMyAdmin
# cp config.inc.php.sample config.inc.php
Scroll down where you see the first <Directory> statement:
# vi /usr/local/etc/apache22/httpd.conf
Deny from all
And add the following:
Exit and then restart Apache:
Alias /phpmyadmin "/usr/local/www/phpMyAdmin"
Require all granted
Now to add a user with "superuser" options for mysql, heres how to do it:
# apachectl restart
When you get to the mysql> prompt type:
# mysql -u root -p
This is the same user/pass combination that you created in the config.inc.php page.
GRANT ALL PRIVILEGES ON *.* TO mysqluser@localhost IDENTIFIED BY 'password' WITH GRANT OPTION;
Now if you go to http://yoursite.com/phpmyadmin you should get a phpmyadmin page. Use the username and password you set above to login.
If you get a forbidden page, You will want to check the Allow from line in the Directory statement above and make sure it lists the network you are coming from. If not, All you will get is a forbidden message.