1. Download phpmyadmin
Firstly, let's download phpmyadmin from
phpMyAdmin Site
2. Extract the package
Open Terminal and Extract downloaded package to /usr/local/ by running command
sudo unzip phpMyAdmin-4.1.4-english.zip -d /usr/local/
3. Rename the directory name
sudo mv /usr/local/phpMyAdmin-4.1.4-english /usr/local/phpmyadmin
4. Change hostname to IP Address
cd /usr/local/phpmyadmin
sudo cp config.sample.inc.php config.inc.php
nano config.inc.php
Change
[$i]['host'] = ‘localhost’ to
$cfg['Servers'][$i]['host'] = ’127.0.0.1′
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
5. Configure apache to enable http://localhost/phpmyadmin
sudo nano /etc/apache2/other/phpmyadmin.conf
add this line codes below:
Alias /phpmyadmin /usr/local/phpmyadmin
< Directory /usr/local/phpmyadmin >
Options Indexes
Order allow,deny
Allow from all
< /Directory >
6. Start the apache
sudo apachectl start
7. Enable the PHP module
sudo nano /etc/apache2/httpd.conf
Then, uncomment the
#LoadModule php5_module libexec/apache2/libphp5.so to
LoadModule php5_module libexec/apache2/libphp5.so
8. Restart the apache
sudo apachectl restart
Done, now you can access the http://localhost/phpmyadmin