phpmyadmin, no more silly SQL commands

Submitted by admindm on Fri, 10/12/2012 - 18:56

phpMyadmin is basically a tool to manage your MySQL databases from within a web browser. Without it you would need to do a lot of typing whenever you wanted to create a new database or user. You can still manage your database from the terminal if you wish, but this is a lot easier. If you want to learn MySQL commands its usefull too as the commands will be printed at the top of the web browser window. We start by installing phpMyadmin, log in to your server via ssh and type this command.

sudo apt-get install phpmyadmin

You will be asked to confirm the install then a lovely pink screen will pop up asking if your using apache2 or lighttpd. Select apache2 and press enter. You will then be asked if you want to setup dbconfig-common. You don't need this if you would consider yourself an advanced database administrator. In my case though I'm going to call myself a basic database administrator and select yes so dbconfig-common can do a lot of the work for me. Next your asked for your database administrators password. This can be any user that has access as a MySQL root user (note this is not the same as a server root user). If you have been following this guide this will be the password you set for MySQL during server installation. Your then asked to set a password for phpmyadmin to communitcate with the database server. If you leave this blank a random password gets generated. I hope you have a good memory because this isn't the last password you'll need to remember during this guide. Choose your password and press enter to move on. Naturally you will be asked to confirm the password.

phpmyadmin installphpmyadmin installphpmyadmin installphpmyadmin install

Once the installation finishes you can test phpmyadmin by opening a web browser and typing serveraddress\phpmyadmin. In my case

192.168.0.200/phpmyadmin

If you have setup port forwarding then this can aslo be your internet IP address or if set correctly can also be any web address pointed at the server. You should see phpMyAdmin's login screen. You log in with your MySQL username and password. Bear in mind phpMyAdmin is NOT a database. It's an interface which makes accessing MySQL easier. Your username will likely be root and the password will be the one you specified during the server install.

phpmyadmin installphpmyadmin install