Ubuntu 16.04 LTS – How To Install PHP, phpMyAdmin and MySQL
Step 1 – Update repositories.
root@mail:/# apt-get update
root@mail:/# apt-get upgrade
Step 2 – Install mysql with the following command.
root@mail:/# apt-get install mysql-server mysql-client
Step 3 – You have to enter password for the root user.
Step 4 – You have to repeat password for the root user.
Step 5 – Install php7 for mysql with the following command.
root@mail:/# apt-get install php7-mysql
Step 6 – Install php7myadmin with the following command.
root@mail:/# apt-get install phpmyadmin
Step 7 – Choose web server who you want to use. i strongly recommended apache2
![](http://linux-sys-adm.com/wp-content/uploads/2015/07/phpmyadmin1.jpg)
Step 8 – Configuring phpmyadmin – Configure database for phpmyadmin with dbconfig-common? write YES
![](http://linux-sys-adm.com/wp-content/uploads/2015/07/phpmyadmin2.jpg)
Step 9 – Configuring phpmyadmin – Password of the database’s administrative user:
![](http://linux-sys-adm.com/wp-content/uploads/2015/07/php1.jpg)
Step 10 – Configuring phpmyadmin – MySQL application password for phpmyadmin:
![](http://linux-sys-adm.com/wp-content/uploads/2015/07/php2.jpg)
Step 11 – Configuring phpmyadmin – Password confirmation:
![](http://linux-sys-adm.com/wp-content/uploads/2015/07/php3.jpg)
Step 12 – You have to write the ip address of your server “/” and phpmyadmin. You will phpMyAdmin.
![](http://linux-sys-adm.com/wp-content/uploads/2015/07/php4.jpg)
Step 13 – You have to write password for the root user and login into phpmyadmin.
Step 14 – Restart apache service.
root@mail:/# service apache2 restart