freebsdrocks.net was started originally as nospam.mine.nu.
To install phpmyadmin, run the following commands
# cd /usr/ports/databases/phpmyadmin
# make install clean
Before we continue rainloop will add some apache modules so we should restart apache:
# /usr/local/etc/rc.d/apache24 restart
# cd /usr/local/www/phpMyAdmin
# cp config.inc.php.sample config.inc.php
# vi /usr/local/etc/apache24/httpd.conf
<Directory />
AllowOverride None
Order deny,allow
Deny from all
<Directory>
And add the following:
Alias /phpmyadmin "/usr/local/www/phpMyAdmin"
</Directory "/usr/local/www/phpMyAdmin">
Options None
AllowOverride None
Require all granted
</Directory>
# apachectl restart
# mysql -u root -p
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. You can also Add security to your setup as seen below:
Alias /phpmyadmin/ "/usr/local/www/phpMyAdmin/"
Options none
AllowOverride Limit
Order Deny,Allow
# Deny from all
Require ip 192.168.0.0/24
##Additional lines you can add as needed for more IP addresses
Allow from 127.0.0.1