Introduction
While many users need the functionality of a database management system like MySQL, they may not feel comfortable interacting with the system solely from the MySQL prompt.
phpMyAdmin was created so that users can interact with MySQL through a web interface. In this guide, we'll discuss how to install and secure phpMyAdmin so that you can safely use it to manage your databases on Ubuntu 14.04.
Step One — Install phpMyAdmin
To get started, we can simply install phpMyAdmin from the default Ubuntu repositories.
We can do this by updating our local package index and then using the apt packaging system to pull down the files and install them on our system:
sudo apt-get update
sudo apt-get install phpmyadmin
This will ask you a few questions in order to configure your installation correctly.
The installation process actually adds the phpMyAdmin Apache configuration file into the /etc/apache2/conf-enabled/ directory, where it is automatically read.
The only thing we need to do is explicitly enable the php5-mcrypt extension, which we can do by typing:
sudo php5enmod mcrypt
Afterwards, you'll need to restart Apache for your changes to be recognized:
sudo service apache2 restart
You can now access the web interface by visiting your server's domain name or public IP address followed by /phpmyadmin:
http://domain_name_or_IP/phpmyadmin
That's it ...
While many users need the functionality of a database management system like MySQL, they may not feel comfortable interacting with the system solely from the MySQL prompt.
phpMyAdmin was created so that users can interact with MySQL through a web interface. In this guide, we'll discuss how to install and secure phpMyAdmin so that you can safely use it to manage your databases on Ubuntu 14.04.
Step One — Install phpMyAdmin
To get started, we can simply install phpMyAdmin from the default Ubuntu repositories.
We can do this by updating our local package index and then using the apt packaging system to pull down the files and install them on our system:
sudo apt-get update
sudo apt-get install phpmyadmin
This will ask you a few questions in order to configure your installation correctly.
- For the server selection, choose apache2. Note: If you do not hit "SPACE" to select Apache, the installer will not move the necessary files during installation. Hit "SPACE", "TAB", and then "ENTER" to select Apache.
- Select yes when asked whether to use dbconfig-common to set up the database
- You will be prompted for your database administrator's password
- You will then be asked to choose and confirm a password for the phpMyAdmin application itself
The installation process actually adds the phpMyAdmin Apache configuration file into the /etc/apache2/conf-enabled/ directory, where it is automatically read.
The only thing we need to do is explicitly enable the php5-mcrypt extension, which we can do by typing:
sudo php5enmod mcrypt
Afterwards, you'll need to restart Apache for your changes to be recognized:
sudo service apache2 restart
You can now access the web interface by visiting your server's domain name or public IP address followed by /phpmyadmin:
http://domain_name_or_IP/phpmyadmin
That's it ...