phpMyAdmin is web-based client written in php for managing MySQL and MariaDB databases. It provides a user friendly web interface to access and manage your databases. To ease usage to a wide range of people, phpMyAdmin is being translated into 72 languages and supports both LTR and RTL languages.
Features of phpMyAdmin:
- Friendly web interface
- Supported most of the MySQL features:
- Browse and drop databases, tables, views, fields and indexes.
- Create, copy, drop, rename and alter databases, tables, fields and indexes
- Manage MySQL users and there privileges
- Import data from CSV and SQL
- Export data to various formats: CSV, SQL, XML, PDF, ISO/IEC 26300 – OpenDocument Text and Spreadsheet, Word, LATEX and others
- Administering multiple servers
This article will help you to install phpMyAdmin on CentOS/RedHat System. It required Apache, PHP and MySQL to be installed on server. If you do not have them read our turtorials to how to install them.
How To Install Linux Apache MySQL and PHP (LAMP) Stack on CentOS/RHEL
Step 1: Enable Remi Repository
phpMyAdmin most updated package is available under remi repository. Install it in your system using following commands.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | CentOS/RHEL 6: # rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm CentOS/RHEL 5: # rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm Fedora 20: # rpm -Uvh http://rpms.famillecollet.com/remi-release-20.rpm Fedora 19: # rpm -Uvh http://rpms.famillecollet.com/remi-release-19.rpm Fedora 18: # rpm -Uvh http://rpms.famillecollet.com/remi-release-18.rpm |
Step 2: Install phpMyAdmin
After adding remi repository, install phpMyAdmin using yum package manager. All the dependencies will automatically be installed.
1 | # yum --enablerepo=remi install phpMyAdmin |
Step 3: Configure phpMyAdmin
phpMyAdmin by default allowed to access from localhost only. If you want to make it accessible from remote computers edit /etc/httpd/conf.d/phpMyAdmin.conf and update all 127.0.0.1 with your network like below or enable phpMyAdmin access for everyone.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | Alias /phpMyAdmin /usr/share/phpMyAdmin Alias /phpmyadmin /usr/share/phpMyAdmin ## Comment below section to allow everyone <Directory /usr/share/phpMyAdmin/> <IfModule !mod_authz_core.c> Order Deny,Allow Deny from All Allow from 192.168.1.0/24 Allow from ::1 </IfModule> </Directory> <Directory /usr/share/phpMyAdmin/libraries/> Order Deny,Allow Deny from All Allow from None </Directory> <Directory /usr/share/phpMyAdmin/setup/lib/> Order Deny,Allow Deny from All Allow from None </Directory> <Directory /usr/share/phpMyAdmin/setup/frames/> Order Deny,Allow Deny from All Allow from None </Directory> |
After updating phpMyAdmin Apache configuration file, restart Apache service to reload new settings.
1 | # service httpd restart |
Step 4: Access phpMyAdmin in Browser
Now you can access phpMyAdmin in browser using following url. Change svr1.tecadmin.net with your server IP/FQDN.
1 2 | http://localhost/phpmyadmin/ Login Details: Use MySQL username and password. |
Congratulation’s You have successfully installed phpMyAdmin. Using single phpMyAdmin we can manage multiple MySQL servers by adding multiple remote MySQL server. Use this article to add multiple MySQL hosts in phpMyAdmin.