Phpmyadmin or Alternative for PHP7 + Nginx + MySql 5.7 + Ubuntu 16.04

Hello, I have been reading up on the tutorials and some of the comments on the community pages but I would like to know if there are any better alternatives or any advice to better manage my databases.

I use Phpmyadmin previously on an Apache and Php5 servers but recently deploying a new droplet, I cannot seem to install Phpmyadmin on my new droplet as it is saying that mcrypt has not been found etc.

So at this stage, I am looking for alternatives that can be installed on my droplet specifications or advice as to how I can upload/manage databases without using Shell access since I like using a GUI.

Thanks in advance.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Phpmyadmin does support PHP 7 and Mysql 5.7. I recommend you to grab latest release from their download page. Current download link is:

Also, this is about on requirements (from their download page). Current version compatible with PHP 5.5 to 7.0 and MySQL 5.5 and newer.

How to install:

Download PhpMyAdmin. You can do it using wget from your droplet.

  1. wget

You will need to unpack it by using tar command:

  1. tar xvf phpMyAdmin-4.6.4-all-languages.tar.gz

As you finished it, rename it to phpmydmin and move to /usr/share/.

  1. mv phpMyAdmin-4.6.4-all-languages.tar.gz /usr/share/phpmyadmin

You installed phpmyadmin in /usr/share/phpmyadmin. Now it needs to be configured.

First install needed PHP dependencies - mcrypt and mbstring.

  1. sudo apt-get install php7.0-mcrypt php-mbstring php7.0-mbstring php-gettext

This command will install it on your droplet, but keep in mind, only install, you need to enable it afterwards. To enable it execute following commands:

  1. sudo phpenmod mcrypt
  2. sudo phpenmod mbstring

Now restart PHP-FPM to make changes in effect.

  1. sudo systemctl restart php7.0-fpm

As for nginx, making symbolic link from phpmyadmin to /var/www/html will finish it’s job making available to nginx.

  1. sudo ln -s /usr/share/phpmyadmin /usr/share/nginx/html

Now we need to change blowfish_secret in PHPMyAdmin config. blowfish_secret is using to encrypt passwords in cookie. Recommended length is 32 chars. First of all make file by copying its sample:

  1. sudo cp /usr/share/phpmyadmin/ /usr/share/phpmyadmin/

Now open it with your favourite text editor (e.g. nano).

  1. nano /usr/share/phpmyadmin/

Locate following line: $cfg['blowfish_secret'] = ''; Now enter your secret between '' and save file.

Last step is creating phpmyadmin database. Go to http://droplet_ip/phpmyadmin. Login to phpmyadmin.

You will see warning that phpmyadmin database is missing. You will have link which will take you to page with option to create database. Follow it, click OK, and wait until it finishes.

After that you have working phpmyadmin on NGINX and PHP7.0.

(Optional:) Enable Configuration Storage By default, some of extra options such as change tracking, table linking, and bookmarking queries are disabled. You need to enable it you should do following: Open with text editor.

  1. nano /usr/share/phpmyadmin/

Locate following lines:

// $cfg['Servers'][$i]['controluser'] = 'pma';
// $cfg['Servers'][$i]['controlpass'] = 'pmapass';

Uncomment it by removing // and set some username and password instead of pma (username) and pmapass (password). These are only placeholders.

Also be sure to uncomment following lines under Storage database and tables by removing //.

// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
// $cfg['Servers'][$i]['relation'] = 'pma__relation';
// $cfg['Servers'][$i]['table_info'] = 'pma__table_info';
// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
// $cfg['Servers'][$i]['column_info'] = 'pma__column_info';
// $cfg['Servers'][$i]['history'] = 'pma__history';
// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
// $cfg['Servers'][$i]['tracking'] = 'pma__tracking';
// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
// $cfg['Servers'][$i]['recent'] = 'pma__recent';
// $cfg['Servers'][$i]['favorite'] = 'pma__favorite';
// $cfg['Servers'][$i]['users'] = 'pma__users';
// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';

Now you need to create user for it. Go again to phpmyadmin and go to SQL. Execute following query: GRANT SELECT, INSERT, UPDATE, DELETE ON phpmyadmin.* TO 'pma'@'localhost' IDENTIFIED BY 'pmapass'; This will create in same time create MySQL user and Grant needed privileges.

This is whole tutorial for seting up phpmyadmin. It should be fully working now.

About alternatives I can recommend you MySQL Workbench or HeidiSQL. Both is applications that you install on your own PC, you don’t install anything on droplet. MySQL workbench works on Windows, Linux or OS X, while HeidiSQL works with Windows, but it can be run via wine on Linux.

If you get any problem, comment, I or somebody other will try to help you :)

Add this package-repository to your system.

sudo add-apt-repository ppa:nijel/phpmyadmin

sudo apt-get update

sudo apt-get install PHPMyAdmin 


Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel