How to install phpmyadmin on Ubuntu

This document will show you "How to install phpmyadmin" on your Ubuntu machine. phpmyadmin is just a graphical user interface of your MySql database management system. With the help of phpmyadmin you can manage your databases easily and you could save a lot of time. Though it is a great tool to use, you must practice more on command line interface. Command line interface is much more faster and awesome way to work with MySql.
Install phpmyadmin
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
After first confirmation you will be asked to choose the web server, choose apache2 from the list and press Enter.
Then it will ask you to configure database for phpmyadmin keep "Yes" highlighted and click enter, it will now ask you for your Mysql root user password, then
it will ask you password for phpmyadmin and will ask you to enter it again for confirmation, enter them properly and you will be done installing phpmyadmin.
Now restart Apache server by,
/etc/init.d/apache2 restart
Still you will might not be able to see phpmyadmin using url "http://localhost/phpmyadmin", if you do then you are damn lucky.
If you dont well better do little more work on it.
First locate a file named apache2.conf under directory "/etc/apache2/apache2.conf"
Now you can use gedit by login as root user to edit it or just open it by text editor.(You first need to grant permissions to edit this file, use chmod 777 /etc/apache2 ).
Then at the end of the file write Include /etc/phpmyadmin/apache.conf 
Now restart your Apache server and Mysql server by using following commands
/etc/init.d/apache2 restart
/etc/init.d/mysql restart
Open http://localhost/phpmyadmin/ and you will get to see a GUI for your MySql Database(After entering your username and password of course)
Thank You for helping you out from this site, I really appreciate that.

Add new comment