How to install phpmyadmin on nginx on centos 6.7

pma_logo

 

What Is PhpMyAdmin?

PhpMyAdmin is an open source and most popular web based MySQL administration application for handlingMySQL databases. It was written in PHP language, through this application you can do various MySQLadministration tasks such as create, drop, alter, delete, import, export, search, query, repair, optimize and run other database management command via browser.

In the previous post we saw about installing and configuring nginx/1.10.0 on centos 6.7 . Here we can see about installing PhpMyAdmin 4.0.10.15 on nginx server.

Before starting please make sure you have installed LEMP stack ( Nginx , mysql and php )
Refer this post (Install LEMP on centos 6.7)

 

Install phpMyAdmin 4.0.10.15 on CentOS 6.7

1. Install PhpMyAdmin

you can run the following command to install it.

 

2. Configuring PhpMyAdmin

Enabling Configuration Storage

edit /etc/phpMyAdmin/config.inc.php and replace this line:

With this:

and replace this line:

With this:

 

Import database

Create new tables by importing examples/create_tables.sql. Type this command to find create_tables.sql file

then import it

 

3. Configuring PhpMyAdmin for Nginx

Create this file /etc/nginx/phpmyadmin.conf, and add this content:

Edit /etc/nginx//conf.d/default.conf file and add this line

For reference see below of code

 

4. Final Step

Make folder phpMyAdmin readable for nginx

Now let’s test our configuration:

You should hopefully see a nice successful output from nginx like so:

If your test is successful, you can restart the nginx

Now open http://yoursite.com/phpmyadmin in your browser. You could see phpmyadmin login page . use mysql root username and password to login

DONE

How To Install Linux, nginx, MySQL, PHP (LEMP) stack on CentOS 6.7

phpMyAdmin “Cannot start session without errors”

 

Source:

  1. tecmint.com
  2. scalescale.com
  3. krizna.com

 

[lastupdated]

.