Not able to access my phpmyadmin in ubuntu droplet

January 10, 2017 1.2k views
Apache DigitalOcean WordPress Ubuntu

Hey few months ago i created one ubuntu droplet, setup well , and all running well.
I used serverpilot to install wordpress

now when i try to access my phpmyadmin, this error i get:
error in processing request
error code 403
error text forbidden

as well as last two lines in phpmyadmin shows this:
A newer version of phpMyAdmin is available and you should consider upgrading. The newest version is 4.6.5.2, released on 2016-12-05.
The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. Find out why.
Or alternately go to 'Operations' tab of any database to set it up there.

when i click on findout why,
this is what it says:
Configuration of pmadb… not OKDocumentation
General relation features Disabled
Create a database named 'phpmyadmin' and setup the phpMyAdmin configuration storage there.

someone can help me please

8 Answers
jtittle1 January 11, 2017
Accepted Answer

@hostmanager1yakin

phpMyAdmin is simply a web-based interface to MySQL, as is Adminer. The difference is that Adminer is a single file whereas phpMyAdmin is hundreds of files. Neither have anything to do with WordPress, will effect your WordPress installation, or even your web server software. They are both PHP scripts used to access MySQL or other database types from a web-based interface :-). Without them, the only way to access your database would be through the Command Line Interface.

What you'd do here is download the adminer.php file from the website referenced and drop it in to a public directory, such as ./public, ./public_html or wherever your public directory is located (i.e. the one where WordPress' index.php file resides).

You would then use your browser to navigate to http://yoursite.ext/adminer.php (for example) and then login with your database credentials to access your database.

For security purposes, renaming adminer.php to something random that only you know would be the most preferred method of usage as adminer.php is a common file name since it's a well known script, thus bots do scan for that file and if found, will attempt to brute-force their way in (similar to how the same happens to ./wp-admin on WordPress installations unless you lock it down).

@hostmanager1yakin

Unless you're attached to something specific that phpMyAdmin offers, I would recommend Adminer.

Adminer is a single-file that can be dropped anywhere and accessed like any other PHP file. It works much like phpMyAdmin without all the complexities. It also saves you the hassle of having to lock down and secure another location to prevent attempted unauthorized access as you can simply delete the file when you're done and upload it when you need it.

https://www.adminer.org

If you're set on using phpMyAdmin, deleting the configuration file and then going through the setup process as if it were a fresh installation should fix any unresolved issues. I would, however, suggest upgrading to the latest version for security purposes.

How you go about this really depends on how you set it up. Was it installed by you or during the setup portion with ServerPilot? If by you, all you'd need to do is download the new version and upload those files over the existing ones and then run the setup again.

@hostmanager1yakin

For you to be able to access it over the web, the file will need to be public, which is why I recommend renaming it to something a little more random, such as x4Gd90.php, then simply create a bookmark to the file in your bookmark bar. This negates the need for you to type it in manually.

That said, I would really recommend only uploading the file when you really need to access your DB from the web and then delete it when you're done.

@jtittle

I don't know much about technicalities.

See I have a running site. If I change database to admirer or upgrade the phpmyadmin , will I not loose anything on my current site?

Current site is on wordpress and was setup via serverpilot..

@jtittle so I need to first delete all the phpmyadmin files and then upload admirer.php file?

And upload database again in admirer?

Or is there any way just to solve the phpmyadmin problem I stated above because I need to back up the database mysql first

  • @hostmanager1yakin

    No, not at all. Adminer is simply one file you upload. You don't need to delete your database, or change it at all. It's simply a way to help you connect to your database, nothing more -- it's a PHP file. All you need to do is download the file from the website I referenced, upload it to your web root, and then access it just as you do your website. Nothing more to it :-).

    Adminer, like phpMyAdmin, simply allows you to access your database and perform backups, modify tables, add data, etc. I suggested it because it's far easier to manage one file as opposed to the hundreds required by phpMyAdmin.

@jtittle i am afraid, as if i put admirer.php in working, can i delete the phpmyadim-myspecialword folder entirelly.. do i not loose any database inside it? Can you privately help on it, on skype?

@jtittle @jsamuelsp I installed adminer-myword.php with my domain, and all worked.. now question is, just putting this file directly in my public folder is unsafe?

any better way to place file somewhere else to make it safer?

and shall i delete phpmyadmin folder from my root /public which i used earlier?

  • If you're not using phpMyAdmin any longer, it's best to delete it.

    It's safe to have Adminer in your "public" folder. If you prefer, you can make sure other people can't find it by giving it a name with some random characters or a word only you know such as adminer-2345345.php

thats great and sweet of you @jtittle

can i now delete phpmyadmin folder inside public root.

if i do that, will i loose any database?

  • @hostmanager1yakin

    Yes you can safely delete the ./phpMyAdmin directory. It's not directly tied to MySQL and it's only a bunch of PHP files, thus deleting it will not delete your database(s).

    • Hi @jtittle so where exactly my database will be... Just to ensure I don't delete them mistakenly in future.

      • @hostmanager1yakin

        If you're using MySQL, typically your database files will be located in:

        /var/lib/mysql
        

        Your database will be broken down in to multiple files, though you shouldn't attempt to open these files directly. You should only use the MySQL CLI or a script, i.e. Adminer, to access your database.

        Think of this directory as your database storage directory (as that's essentially what it is). Your database data will be stored there for safe keeping.

Have another answer? Share your knowledge.