Ran phpmyadmin installation tutorial but can't access http://my_site/phpmyadmin

I have Ubuntu 16.04 droplet with a one-click install of Wordpress.

I went through this tutorial » How To Install and Secure phpMyAdmin on Ubuntu 16.04 « but still couldn’t access phpmyadmin.

There are portions of the initial installation that I may have done improperly, but I can’t figure out how to remove and reinstall/reconfigure phpmyadmin.

I tried to remove the installation.

  • I ran:
$ sudo apt-get remove phpmyadmin php-mbstring php-gettext
  • Then I:
$ sudo service apache2 restart
  • Then:
$ sudo apt-get install phpmyadmin php-mbstring php-gettext

But I didn’t get the same installation prompts. What I got as a result of the installation was:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
The following NEW packages will be installed:
  php-gettext php-mbstring phpmyadmin
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/3,951 kB of archives.
After this operation, 25.1 MB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package php-gettext.
(Reading database ... 87430 files and directories currently installed.)
Preparing to unpack .../php-gettext_1.0.11-2build1_all.deb ...
Unpacking php-gettext (1.0.11-2build1) ...
Selecting previously unselected package php-mbstring.
Preparing to unpack .../php-mbstring_1%3a7.0+35ubuntu6_all.deb ...
Unpacking php-mbstring (1:7.0+35ubuntu6) ...
Selecting previously unselected package phpmyadmin.
Preparing to unpack .../phpmyadmin_4%3a4.5.4.1-2ubuntu2_all.deb ...
Unpacking phpmyadmin (4: ...
Processing triggers for man-db (2.7.5-1) ...
Setting up php-gettext (1.0.11-2build1) ...
Setting up php-mbstring (1:7.0+35ubuntu6) ...
Setting up phpmyadmin (4: ...
dbconfig-common: writing config to /etc/dbconfig-common/phpmyadmin.conf
dbconfig-common: flushing administrative password

I ran:

$ sudo service apache2 restart

Once again and tried to get into http://my_site/phpmyadmin to no avail. What can I do?

The files all seem to be on the server, just not accessible in the browser. Thanks for your help. -Alex

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.

Removing phpmyadmin package will not remove it’s configuration. To completely remove phpmyadmin including configuration you need to use purge option:

  1. sudo apt-get remove --purge phpmyadmin

Next time you install it, you’ll be asked for initial configuration. However if you want to reconfigure it you don’t need to reinstall it. You can use dpkg to force run initial configuration prompt:

  1. sudo dpkg-reconfigure phpmyadmin

I don’t think it’s needed. Some problems could arise and it can be fixed by enabling phpmyadmin explicitly.

  1. sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf

Above command will create symlink for PMA Apache config from phpmyadmin default directory to apache available directory. When you do this, you need to enable config.

  1. sudo a2enconf phpmyadmin.conf

After enabling configuration, Apache restart is required.

  1. sudo systemctl restart apache2

Try once again. And hope it works. =)

I have also followed the tuturial and after all steps i am getting this



use PhpMyAdmin\Routing;

if (! defined(‘ROOT_PATH’)) { // phpcs:disable PSR1.Files.SideEffects define(‘ROOT_PATH’, DIR . DIRECTORY_SEPARATOR); // phpcs:enable }

global $route, $containerBuilder;

require_once ROOT_PATH . ‘libraries/’;

$dispatcher = Routing::getDispatcher(); Routing::callControllerForRoute($route, $dispatcher, $containerBuilder);

Tried the same solution but all I get is this :

The requested URL /phpmyadmin was not found on this server.

Steps taken :

Went trough all the Lamp instalation/config

also installed phpmyadmin trough apt-get.

please advise

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