How to install and secure phpMyAdmin on Ubuntu 12.04

FerdieQO

Well-known member
Joined
Jul 15, 2016
Messages
213
Points
28
phpMyAdmin is an open source software popular web platform for managing MySQL.

Before you proceed to install phpMyAdmin you need preinstalled LAMP server or LEMP on on Ubuntu.

We have two ways to install phpMyAdmin package is installed and running phpMyAdmin through a php script as usual. I will show both ways.

1. Install phpMyAdmin package

Run the following command

Code:
sudo apt-get install phpmyadmin
During the installation process you need to keep in mind:

- Select Apache2 server
- Choose Yes when asked Configure the database for phpmyadmin with dbconfig-common
- Enter the MySQL password when asked
- Enter the password to access phpMyAdmin

Once installed, additional configuration phpmyadmin installed on Apache

Code:
sudo nano /etc/apache2/apache2.conf
Add the following code to the end of file

Code:
include /etc/phpmyadmin/apache.conf
Restart apache

Code:
sudo service apache2 restart
Now you can access via the link phpMyAdmin http://your_IP_address/phpmyadmin

2. Install phpMyAdmin as a script

I usually use this way for two reasons:

- Only running then will use the memory -> save server resource
- Can customize the path of phpmyadmin -> more security

First you need to select the version you want to install phpMyAdmin homepage

Copy the link directly to the file extension is .tar.gz, eg 4.6.3 version is https://files.phpmyadmin.net/phpMyAdmin/4.6.3/phpMyAdmin-4.6.3-all-languages.tar.gz

In www directory contains content sites, run the following command (you can create a folder to store files)

Code:
wget https://files.phpmyadmin.net/phpMyAdmin/4.6.3/phpMyAdmin-4.6.3-all-languages.tar.gz
Extract to the current folder

Code:
tar -xzvf phpMyAdmin-4.6.3-all-languages.tar.gz
PhpMyAdmin is complete you will have folder-4.4.14-all-languages, to use you visit the link http: //your_ip_address/phpMyAdmin-4.6.3-all-languages. Of course you can change the name to whatever you want to use and more secure.
 

VirtuBox

Well-known member
Registered
Joined
May 3, 2016
Messages
1,622
Points
83
Thanks for the tutorial but is "Ubuntu 12.04" a mistake ?
Because it not supported anymore and could have several security issue.
 

Steve32

Premium Member
Premium
Registered
Joined
Mar 15, 2014
Messages
116
Points
18
Steve32
I agree with you but the version of Ubuntu is not a problem, we can get latest version of Ubuntu by upgrading it.
I prefer using way #2 because it doesn't consume server resource and more secure but not sure it will require configurations when installing it as a script.
 

VirtuBox

Well-known member
Registered
Joined
May 3, 2016
Messages
1,622
Points
83
VirtuBox
yes it will work the same on 14.04 or 16.04 but I was surprised to see 12.04 :blink:
If you use php7 and want to have access to your mysql server without installing phpmyadmin(which require php5.6 to work), you should try adminer, the same than phpmyadmin in a single php file. Just to upload it on your server and to use your browser to access to yourdomain.com/adminer.php

You can secure it with an ACL or simply delete it when you have finished.
 
Latest Threads
Replies
0
Views
123
Replies
1
Views
79
Recommended Threads
Replies
10
Views
4,392
Replies
2
Views
2,356
Replies
18
Views
8,045
Replies
6
Views
3,330
Replies
19
Views
12,371

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top