Share this page:

Install phpMyAdmin

phpMyAdmin is a tool for managing MySQL servers using a web UI in your browser.  It makes it possible to view and edit the contents of a MySQL database.  phpMyAdmin is written in PHP, and it needs a web server and a MySQL database to be installed on a server in order to work.  If these things haven't been installed on your server already, follow this tutorial on setting up a LAMP server

Type this command to install phpMyAdmin:

$ sudo apt-get install phpmyadmin

The installer will prompt to see which web server needs to be configured.  In this case, choose Apache. 

phpMyAdmin installation, select a web server

Next, you will be prompted to see if you want the database to be automatically configured to work with phpMyAdmin.  Choose 'yes'.

phpMyAdmin installation, configure database
Now you will see a prompt for the database server's admin password.  In the article about setting up a LAMP server, I used 'mypassword':

Enter the database server's root password

Choose a password that phpMyAdmin can use to connect to the database server. I used 'appassword':

Enter a password for phpMyAdmin to use to access the database

Enter it again to confirm your password:

Confirm the phpMyAdmin password

Apache's main configuration file needs to be edited in order to include settings from phpMyAdmin's configuration file.  Open it in nano with this command:

$ nano /etc/apache2/apache2.conf

Scroll down to the end of the file and add the following line:

Include /etc/phpmyadmin/apache.conf

Restart Apache with this command:

$ sudo service apache2 restart

Now visit the phpMyAdmin home page in a browser by visiting http://server's IP address/phpmyadmin/, in my case this is http://192.168.1.50/phpmyadmin/.  Log in with the root password for the database server, mypassword.  Now you can begin exploring phpMyAdmin: 

phpMyAdmin home page

Click on the phpmyadmin database on the left hand side of the page and look at the tables used by phpMyAdmin:

phpMyAdmin editing tables


Comments

More from this category:

PHP