This article will explain how you can use PHPMyAdmin and how to create a database dump.

By default it is accessible at http://appname.hypernode.io/phpmyadmin

For protection, phpMyAdmin by default is only accessible through the appname.hypernode.io/phpmyadmin URL, on Vagrant via the appname.hypernode.local/phpmyadmin url and on Docker through YourBaseURL/dbadmin after you followed these instructions. You can adjust this behaviour to your own preference.

Working with phpMyAdmin

Access phpMyAdmin

Credentials

PHPMyAdmin uses the same user and password your database uses. You can find them safely stored in /data/web/.my.cnf.

All customers: via URL

Did you order a trial via Hypernode.com? Please be aware you do not have access to a control panel yet. Access phpMyAdmin only via http://appname.hypernode.io/phpmyadmin.

You can log in using the credentials supplied in your .my.cnf file or through the user/password you might have created.

Dutch customers: via Service Panel

As a Dutch customer you can access phpMyAdmin via your Service Panel as well:

  • Log in to the Byte Service Panel
  • Select your Hypernode plan
  • Click on the Hypernode tab.
  • Click phpMyAdmin
phpMyAdmin is accessible through the Service panel

Use phpMyAdmin on Hypernode

Create a database dump using phpMyAdmin

  • Go To http://appname.hypernode.io/phpmyadmin
  • Click on “Databases” and select the database.
  • Click on “Export”.
  • Click on “Go” and the export/backup will be available.

If you have a large database, making a database dump through phpMyAdmin is not very reliable. Before importing it, make sure the integrity of your database dump is sane!

Configure phpMyAdmin

Create whitelisting and/or basic_auth config

If you haven’t created a whitelist or basic_auth config using include files to protect your phpmyadmin from unsolicited IP addresses, do this first before you follow the instructions below.

Using phpMyAdmin over SSL or through another URL

When you redirect all traffic to HTTPS, you might experience a SSL browser error when connecting to PHPMyAdmin as the SSL certificate of your domain does not match the .hypernode.io domain name.

To avoid this, there are 2 possible solutions:

  • Use Let’s Encrypt and create an SSL certificate for appname.hypernode.io.
  • Adjust your Nginx config to make phpMyAdmin accessible through another url then appname.hypernode.io.

For the latter, use the instructions below.

Reroute /phpmyadmin to /dbadmin and add a whitelist

When you want to use phpMyAdmin over SSL, or you want to add a whitelist with IP’s that are allowed to access phpMyAdmin, you can do so by moving phpMyAdmin to another URL that we can adjust to our needs:

  • First, create a symlink in /data/web/public:

  • For Magento 2, depending on your symlink settings you can use the same command as for a Magento 1 environment or you can use this command for the symlink:

  • Next, create a snippet in /data/web/nginx called server.phpmyadmin with the following content:

  • Next, create the include.whitelist in /data/web/nginx and add your IP(s) to the snippet

And finally visit phpMyAdmin on https://yourdomain.nl/dbadmin

This will only add another URL where phpMyAdmin is accessible. If you only want to use this endpoint, block all access to /phpmyadmin too

Blocking all access to phpMyAdmin

If you want to fully disable phpMyAdmin, create the following snippet as /data/web/nginx/server.phpmyadmin:

Troubleshooting phpMyAdmin

  • The phpMyAdmin button in the control panel redirects to https:// and gives a 404 in Nginx

This is probably because you redirect ALL traffic over HTTPS. Try using PHPMyAdmin over ssl as explained above.

  • I’m receiving an error while dumping the database

Most of the time this happens when a database is large and you exceed the max_execution_time or memory_limit in php. If this happens try dumping your database on the command line

  • My phpMyAdmin does not show any images

This happens when you redirect all traffic to HTTPS, causing mixed content errors in your browser. To solve this, use phpMyAdmin over SSL.

  • Static content doesn’t (fully) display

This happens if you define a regex location block in your nginx config that matches phpmyadmin’s static files; This will override the existing config for static files under /phpmyadmin/. To solve this, you will have to change your custom location block to not match files in the /phpmyadmin/ location.

02