Getting Started
As always you will need to have Raspbian installed or a similar operating system installed before we can get started. Be sure to head over to my page on installing Raspbian if you haven't yet learnt how to do this.
I have broken this tutorial down into two steps, first we will install the web server software and also MYSQL. In the 2nd step we will take a look at installing the PHPMyAdmin. If you have come from theRaspberry Pi web server tutorial, then you can simply skip the first step as you would have already done this.
Installing Raspberry Pi MYSQL
sudo apt-get install mysql-server
mysql -u root -p
If you want to be able to interact with MYSQL in Python you will need to install the Python bindings as well. You can do this by entering the following command.
sudo apt-get install python-mysqldb
Now we're done installing the Raspberry Pi MYSQL you may want to install PHPMyAdmin so you have a nice clean interface to work with.
Installing Raspberry Pi PHPMyAdmin
You will find that installing Raspberry Pi PHPMyAdmin is very easy to do any won't take long at all. It is even faster if you have already installed the MYSQL database and Apache.
sudo apt-get install apache2 php5 libapache2-mod-php5
sudo apt-get install phpmyadmin
sudo nano /etc/apache2/apache2.conf
Include /etc/phpmyadmin/apache.conf
Once done save & exist by pressing CTRL +X and then y.
Don't forget link because web root is at /Work/www/weewx:
sudo ln -s /usr/share/phpmyadmin /Work/www/weewx/phpmyadmin
sudo /etc/init.d/apache2 restart
http://192.168.1.108/phpmyadmin
If you want to enable external access to the either PHPMyAdmin or MYSQL then you will need to setup port forwarding. To learn how to do this check out my guide on port forwarding. The ports you will need to forward is 80 for PHPMyAdmin and MYSQL is 3306.