phpMyAdmin Setup on LAMP Ubuntu and Debian Server

Sunday, July 12th 2015. | how to

#howto ,#tutorial #VPS – phpMyAdmin Setup on LAMP Ubuntu and Debian Server – This tutorial explains step by step guide (with pics) about phpMyAdmin Setup on LAMP Ubuntu and Debian Server

Being one of popular web-based app to manage MySQL databases, phpMyAdmin has already been installed on thousands servers and is included in various hosting control panel like WHM/cPanel and Vesta CP. This article will show you in step by step about how to install and setup phpMyAdmin on either Ubuntu or Debian server running LAMP stack which in this case is Linux, Apache, MariaDB and PHP (this guide also works if you are using original MySQL server).

Prerequisites

  1. A SSH client like Putty and basic knowledge about how to use it.
  2. Basic knowledge about common Unix command to SSH to your server.
  3. A server or VPS with at least 512MB of RAM (in OpenVZ you can use 256MB but not really recommended). If you not already have one then you can read my list of recommended VPS providers or this top low end cloud server providers. Quick recommendation: Atlantic.net, Digital Ocean and RamNode.
  4. Have one already? Now install Ubuntu or Debian OS on it. In this tutorial I use Debian 8 32-bit on Atlantic’s 512MB cloud server.
  5. Install Apache, MySQL / MariaDB and PHP on it. How to install LAMP on Debian and Ubuntu.
  6. About 20 minutes of your time
  7. a cup of coffee or tea.

The Steps

Step 1 – Login to your server as root or as user with root / sudo privilege. In this article I simply login as root so I ditch sudo, however if you logged in as user, then do not hesitate to add sudo prefix to each command.

2015-07-12_132849

Step 2 – Being a popular software, phpMyAdmin package is available by default at Debian / Ubuntu repository so you can simply make use of apt-get to install it.

apt-get install phpmyadmin -y

sample output:

2015-07-12_133100

Step 3 – During the process, it will ask you series of questions so answer it accordingly. First, choose what web server is running on your server:

2015-07-12_133132

use arrow to navigate and use Enter to select.

Step 4 – phpMyAdmin will then ask whether to execute common configuration task or not. Because phpMyAdmin must have a database installed and configured before it can be used, so you better to execute it. Select Yes.

2015-07-12_133205

Step 5 – Enter password for administrative user:

2015-07-12_133236

Step 6 – Now define MySQL application password phpmyadmin:

2015-07-12_134216

enter that password once again to confirm:

2015-07-12_133319

Step 7 – That’s it. Once done you’ll see something like thiis:

2015-07-12_133343

Step 8 – Open up your browser and access your newly installed phpMyAdmin using this address:

http://x.x.x.x/phpmyadmin

and if you see 404 not found page, then do this: Edit apache2.conf file using either vi or Nano

nano /etc/apache2/apache2.conf

scrolldown the page and add this at the very bottom:

Include /etc/phpmyadmin/apache.conf

It should look similar to this:

2015-07-12_134839

Now save changes and exit the editor. In Nano it is Control+O then Control+X.

Step 9 – Finally restart Apache and reload it on your browser again:

service apache2 restart

## or in newer OS (e.g: Debian 8) use:
systemctl restart apache2

It should now display phpMyAdmin login page:

2015-07-12_135724

Step 10 – Login for the very first time using root as username and the password you defined earlier. Once logged in, you can then create new database, new database user and assign proper privilege of that user to the database. Well, there are many mysql management tasks you can do via phpMyAdmin.

2015-07-12_140222

Done!

Congratulation you can now manage your MySQL databases via world’s well-known phpMyAdmin, a web interface to manage and organize all your mysql databases. Follow me on twitter for faster update.

This post phpMyAdmin Setup on LAMP Ubuntu and Debian Server is part of ServerMom.

Source link