Install phpmyadmin
Source
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 from an Ubuntu 16.04 system.
First, we'll assume that you are using a non-root user with sudo privileges, as described in steps 1-4 in the initial server setup of Ubuntu 16.04.
We're also going to assume that you've completed a LAMP (Linux, Apache, MySQL, and PHP) installation on your Ubuntu 16.04 server. If this is not completed yet, you can follow this guide on installing a LAMP stack on Ubuntu 16.04.
Finally, there are important security considerations when using software like phpMyAdmin, since it:
Once you are finished with these steps, you're ready to get started with this guide.
We can do this by updating our local package index and then using the
Warning: When the first prompt appears, apache2 is highlighted, but not selected. 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.
The only thing we need to do is explicitly enable the PHP
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 from an Ubuntu 16.04 system.
Prerequisites
Before you get started with this guide, you need to have some basic steps completed.First, we'll assume that you are using a non-root user with sudo privileges, as described in steps 1-4 in the initial server setup of Ubuntu 16.04.
We're also going to assume that you've completed a LAMP (Linux, Apache, MySQL, and PHP) installation on your Ubuntu 16.04 server. If this is not completed yet, you can follow this guide on installing a LAMP stack on Ubuntu 16.04.
Finally, there are important security considerations when using software like phpMyAdmin, since it:
- Communicates directly with your MySQL installation
- Handles authentication using MySQL credentials
- Executes and returns results for arbitrary SQL queries
Once you are finished with these steps, you're ready to get started with this guide.
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 php-mbstring php-gettext
This will ask you a few questions in order to configure your installation correctly.Warning: When the first prompt appears, apache2 is highlighted, but not selected. 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.
- For the server selection, choose apache2.
- 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
/etc/apache2/conf-enabled/
directory, where it is automatically read.The only thing we need to do is explicitly enable the PHP
mcrypt
and mbstring
extensions, which we can do by typing:
- sudo phpenmod mcrypt
- sudo phpenmod mbstring
Afterwards, you'll need to restart Apache for your changes to be recognized:
- sudo systemctl restart apache2
You can now access the web interface by visiting your server's domain name or public IP address followed by /phpmyadmin
:https://domain_name_or_IP/phpmyadmin
Comentarios
Publicar un comentario