phpMyAdmin with Nginx on Linuxmint 17

phpMyAdmin
phpMyaAdmin is the web based administration tool for managing the MySQL, MariaDB and Drizzle servers, it helps in performing databases activities such as creating, deleting ,querying , tables, columns, relations, indexes, users, permissions, etc. This guide will help you to install phpMyAdmin on Linuxmint 17.

Before installing phpMyAdmin, you must have LAMP installed on the server. Here is the tutorial on Installing Nginx on Linuxmint 17.

Installing phpMyAdmin:

I am assuming that you have completed the previous steps. Install phpMyAdmin using the following command.

$ sudo apt-get install phpmyadmin

Configuring phpMyAdmin:

phpMyAdmin package do not put any config file for Nginx, we have to create it as per our requirement. In Nginx, virtual host file can be found in /etc/nginx/conf.d directory. Lets create file called “phpmyadmin.conf”

$ sudo nano /etc/nginx/conf.d/phpMyAdmin.conf

Paste the following content into the file, do modify it as per your requirement.

  server {
listen   80;
server_name phpmyadmin.itzgeek.com;
root /usr/share/phpmyadmin;
 
location / {
index  index.php;
}
 
## Images and static content is treated different
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
access_log        off;
expires           30d;
}
 
location ~ /\.ht {
deny  all;
}
 
location ~ /(libraries|setup/frames|setup/libs) {
deny all;
return 404;
}
 
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin$fastcgi_script_name;
}
}

Restart the services.

$ sudo service nginx reload
$ sudo service php5-fpm reload

Accessing phpMyAdmin:

Now access the phpMyAdmin from the browser, url will be http://your-fqdn. Login by using root or admin user.

Linuxmint 17 - Nginx phpMyadmin Login
Linuxmint 17 – Nginx phpMyadmin Login

You will get the database page.

Linuxmint 17 - Nginx phpMyadmin Home page
Linuxmint 17 – Nginx phpMyadmin Home page

That’s All. Hope this helped you, we welcome your comments.

POSTS YOU MAY LIKE -:)

Share This Post

Shares