In this recipe, we will set up a well-known web-based MySQL administrative tool—phpMyAdmin.
You will need access to a root account or an account with sudo
privileges.
You will need a web server set up to serve PHP contents.
Follow these steps to install web access for MySQL:
mcrypt
extension for PHP:$ sudo php5enmod mcrypt
phpmyadmin
with the following commands:$ sudo apt-get update $ sudo apt-get install phpmyadmin
phpmyadmin
:<yes>
to proceed with the configuration process.phpmyadmin
user. Enter the new password and then confirm it on the next screen:phpmyadmin
will ask for web server selection:http://server-ip/phpmyadmin
. Use your admin login credentials on the login screen. The phpmyadmin
screen will look something like this:PHPMyAdmin is a web-based administrative console for MySQL. It is developed in PHP and works with a web server such as Apache to serve web access. With PHPMyAdmin, you can do database tasks such as create databases and tables; select, insert, update data; modify table definitions; and a lot more. It provides a query console which can be used to type in custom queries and execute them from same screen.
With the addition of the Ubuntu software repository, it has become easy to install PHPMyAdmin with a single command. Once it is installed, a new user is created on the MySQL server. It also supports connecting to multiple servers. You can find all configuration files located in the /etc/phpmyadmin
directory.
If you want to install the latest version of phpMyAdmin, you can download it from their official website, https://www.phpmyadmin.net/downloads/. You can extract downloaded contents to your web
directory and set MySQL credentials in the config.inc.php
file.