Setup PHPMyAdmin on ubuntu

By: Ryan Wong at

Heres steps to install phpmyadmin on ubuntu.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
sudo apt-get install phpmyadmin apache2-utils

sudo nano /etc/apache2/apache2.conf
#Include at bottom
Include /etc/phpmyadmin/apache.conf

sudo service apache2 restart

sudo nano /etc/phpmyadmin/apache.conf

<Directory /usr/share/phpmyadmin>
Options FollowSymLinks
DirectoryIndex index.php
AllowOverride All
[...]

sudo nano /usr/share/phpmyadmin/.htaccess
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /etc/apache2/.phpmyadmin.htpasswd
Require valid-user

#add users
sudo htpasswd -c /etc/apache2/.phpmyadmin.htpasswd username

sudo service apache2 restart