Welcome to Home.

Sunday, October 21, 2018

Install PhpMyAdmin, Apache2 And MySQL On Ubuntu 18.04 LTS Server


phpMyAdmin is a web-based tool that allows users to easily manage MySQL or MariaDB databases. If you’re not comfortable managing databases via Linux command line , you may want to use phpMyAdmin web interface to manage your databases instead.


Install MySQL Database Server

Run the commands below to install MySQL database server
sudo apt update
sudo apt install mysql-server mysql-client
During the installation, you’ll be prompted to create and confirm MySQL root password.. please do.



Install Apache2 HTTP Server

Next, run the commands below to install Apache2 HTTP Web Server
sudo apt install apache2

Install PHP And Related Modules

Run the commands below to install PHP and related PHP modules.
sudo apt-get install php php-cgi libapache2-mod-php php-common php-pear php-mbstring

Reload Apache2

sudo systemctl reload apache2.service

 Install PhpMyAdmin

Now that Apache2 and PHP are installed the final step is to install phpMyAdmin and configure. To do that, run the commands below
sudo apt-get install phpmyadmin php-gettext
When prompted to choose the webserver, select cat apache2 and continue.
+------------------------+ Configuring phpmyadmin +-------------------------+
 | Please choose the web server that should be automatically configured to   |
 | run phpMyAdmin.                                                           |
 |                                                                           |
 | Web server to reconfigure automatically:                                  |
 |                                                                           |
 |    [*] apache2                                                            |
 |    [ ] lighttpd                                                           |
 |                                                                           |
 |                                                                           |
 |                                 <ok>                                      |
 |                                                                           |
 +---------------------------------------------------------------------------+
When prompted again to allow debconfig-common to install a database and configure select No.
 +------------------------+ Configuring phpmyadmin +-------------------------+
 |                                                                           |
 | The phpmyadmin package must have a database installed and configured      |
 | before it can be used.  This can be optionally handled with               |
 | dbconfig-common.                                                          |
 |                                                                           |
 | If you are an advanced database administrator and know that you want to   |
 | perform this configuration manually, or if your database has already      |
 | been installed and configured, you should refuse this option.  Details    |
 | on what needs to be done should most likely be provided in                |
 | /usr/share/doc/phpmyadmin.                                                |
 |                                                                           |
 | Otherwise, you should probably choose this option.                        |
 |                                                                           |
 | Configure database for phpmyadmin with dbconfig-common?                   |
 |                                                                           |
 |                  <Yes>                   <No>                             |
 |                                                                           |
 +---------------------------------------------------------------------------+



After installing, run the commands below to logon to the database server to enable phpMyAdmin root logon.
Now, open your web browser and login to the server hostname or IP address followed by phpmyadmin
ex. http://example.com/phpmyadmin

1.665em; margin-bottom: 1.718em; padding: 0.07em;">phpmyadmin logon page on ubuntu
Login with MySQL root account you created earlier…
That's it. You are done.


Watch Video.




No comments:

Post a Comment