phpMyAdmin

Configuring MySQL Databases with phpMyAdmin

What is phpMyAdmin?


PhpMyAdmin is a free software tool that allows you to create and manage all aspects of your MySQL databases. The management of database tables, columns, relations, indexes, users and permissions can now be handled with ease. Some of the main features of phpMyAdmin are as follows:

  • Browse and drop Databases, Tables, views, fields and indexes
  • Create, Copy, Drop, Rename and Alter Databases, Tables, Fields and Indexes
  • Execute, Edit and Bookmark any SQL-statement
  • Manage MySQL users and privileges
  • Import data from CSV and SQL
  • Export data to various formats: CSV, SQL, XML, PDF, OpenDocument Text and Spreadsheet, Word plus many others
  • Administer multiple servers
  • Create complex queries using Query By Example (QBE)

For a full list of all the features and functionality, visit the main phpMyAdmin home page: phpMyAdmin



Installing phpMyAdmin


phpMyAdmin can be found in most Linux distributions repositories. This makes the installation quite a simple process. In the following example, we are going to install phpMyAdmin to our openSUSE installation that was used in our MySQL example, however, I have also included some notes for other popular Linux Distributions. I have made the assumption that you have already installed "MySQL". If not, click on the MySQL link above for more information.


Install phpMyAdmin openSUSE/SLES



linux-j2w3:~ # zypper se phpmyadmin
Loading repository data...
Reading installed packages...

S | Name       | Summary                              | Type   
--+------------+--------------------------------------+--------
  | phpMyAdmin | Administration of MySQL over the web | package

From the above output, we can see that phpMyAdmin is not installed. To install phpMyAdmin, we simply issue the command:

zypper in phpmyadmin

Any dependencies will also be installed. To run phpMyAdmin, check that the MySQL server is running by issuing the command:

systemctl status mysql

If the server is not running, you can restart this with the command: systemctl restart mysql

You may also want to check that the Apache web server is running, to do this issue the command: systemctl status apache2

If the apache2 server is not running, you can issue the restart command: systemctl restart apache2

Hopefully if all has gone well you can low log into your phpMyAdmin console via your browser by specifying the following address:

localhost/phpMyAdmin

You should now be able to login and start using your graphical interface:


phpMyAdmin

Debian based systems - Ubuntu and Linux Mint


To install phpMyAdmin, run the following commands:



$ sudo apt-get update

$ sudo apt-get install phpmyadmin

To access phpMyAdmin, you will need to paste the following address into your browser:

localhost/phpMyAdmin


CentOS


Before you can install phpMyAdmin on CentOS or RHEL you will need to install "Extra Packages for Enterprise Linux" (EPEL). Extra Packages for Enterprise Linux (or EPEL) is a Fedora Special Interest Group that creates, maintains, and manages a high quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL), CentOS and Scientific Linux (SL). Packages are available from the following link: EPEL

To install EPEL on CentOS 6 (32 bit version):



# cd /tmp
# wget http://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# rpm -ihv epel-release-6-8.noarch.rpm
# yum -y install phpmyadmin

The above commands will install phpMyAdmin and take care of any dependencies that are required.

To access phpMyAdmin, you will need to paste the following address into your browser:
localhost/phpMyAdmin