Before installing mysql and Phpmyadmin, make sure you have followed all the steps in my previous article about installing Apache and Php .
First make sure that you have installed all the updates and upgrades by running:
sudo apt-get update -y && sudo apt-get upgrade.
sudo apt-get install php5 php-pear php5-xcache to install the support packs for php.
Proceed installing the package for database connectivity :
sudo apt-get install php5-mysql
Now we will install MySQL Server :
apt-get install mysql-server mysql-client
Let’s now proceed with PhpMyAdmin installation.
sudo apt-get install phpmyadmin . A screen will pop to choose your web server. Choose apache2 and press OK. Then this screen will appear. Select Yes.
When installation finishes, you will be asked to fill in a password. Choose a password and confirm it. This will be the root password that you use to log into phpmyadmin.
Further more, you need to allow your apache server to access the phpmyadmin. Type
sudo nano /etc/apache2/apache2.conf and hit Enter. Navigate to the end and add the line :
/etc/init.d/apache2 restart to restart your server.
That’s all. You are ready to access your base. Just type in your browser :
http://"your raspberry ip"/phpmyadmin and you’re ready to go!