By MMSA Billing
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.
$ sudo apt-get remove phpmyadmin php-mbstring php-gettext
$ sudo service apache2 restart
$ 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:
www-browser
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:4.5.4.1-2ubuntu2) ...
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:4.5.4.1-2ubuntu2) ...
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
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!
Accepted Answer
Removing phpmyadmin
package will not remove it’s configuration. To completely remove phpmyadmin
including configuration you need to use purge
option:
- 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:
- sudo dpkg-reconfigure phpmyadmin
I don’t think it’s needed. Some problems could arise and it can be fixed by enabling phpmyadmin
explicitly.
- 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.
- sudo a2enconf phpmyadmin.conf
After enabling configuration, Apache restart is required.
- sudo systemctl restart apache2
Try once again. And hope it works. =)
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.