Installing PhpMyAdmin Quickly

EasyEngine users can install phpMyAdmin quickly with command

ee stack install --phpmyadmin

Since phpMyAdmin does not ship with all the dependancies anymore, you will have install the dependancies manually with the following commands.

Note that you will have to install Composer for these commands to work.

cd /var/www/22222/htdocs/db/pma/
composer install --no-dev

Non EasyEngine Users will have to follow below steps.

Installing PhpMyAdmin in a subdirectory

Assuming example.com site has PHP support enabled.

Run following commands:

cd /var/www/example.com/htdocs/
git clone https://github.com/phpmyadmin/phpmyadmin.git phpmyadmin 
cd phpmyadmin
composer update --no-dev

It will install latest PhpMyAdmin which can be accessed from http://example.com/phpmyadmin

Installing PhpMyAdmin on a separate subdomain

You need to first create a site like mysql.example.com site with PHP support. You can use this tutorial to create a virtual-host with PHP support. Just skip WordPress downloading and database setup part.

Then, run following commands:

Run following commands:

cd /var/www/example.com/htdocs/
git clone https://github.com/phpmyadmin/phpmyadmin.git .
composer update --no-dev

This will install latest phpMyAdmin which can be accessed from http://mysql.example.com/

9 responses to “Installing PhpMyAdmin Quickly”

  1. HI, I used your easy engine to ‘install all’ but it seems as if phpmyadmin is returning 403 access forbidden. Any ideas why it would do so?

  2. Hii Dillon,

    To access phpmyadmin you have to add your ip address in following file

    vim /etc/nginx/common/allowed_ip.conf
    allow 1.1.1.1;
    

    Replace 1.1.1.1 with your ip address and then reload nginx by using following command

    nginx -t && service nginx reload
    

    You can access phpmyadmin by using example.com/pma

  3. Thanks for the quick response. I now get this after restarting nginx:

    [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)
    
    • also:

      [emerg] 16721#0: open() "/var/run/nginx.pid" failed (13: Permission denied)
      

      nginx: configuration file /etc/nginx/nginx.conf test failed

  4. Its seems like you try to reload nginx with non-privilege user try to run reload nginx with following command

    sudo nginx -t && sudo service nginx reload
    
  5. Just confirming that the deny all; does indeed to be removed for this to work and still be secure?

    Thanks.