How to Install phpMyAdmin on Its Own App
One copy of phpMyAdmin installed on a single app on your server will allow you to access all of your apps' databases; however, if you don't want phpMyAdmin installed on one of your existing apps, you can install it on its own with the same result.
Installing phpMyAdmin on its own app has some benefits, including access through a subdomain rather than from a subdirectory and the elimination of potential conflicting .htaccess rules installing it on an existing app could cause.
Create an App for phpMyAdmin
First, create a new app for phpMyAdmin in ServerPilot.
Enter a subdomain for the app, such as db.example.com (or whatever you want it to be). Don't forget to configure DNS for this subdomain.
Now, visit www.phpmyadmin.net/home_page/downloads.php in your browser and download the most recent .tar.gz archive. The file will be named something like phpMyAdmin-4.X.Y-all-languages.tar.gz, where X and Y are version numbers.
Upload the phpMyAdmin archive to your server using SFTP.
In Cyberduck (or your preferred SFTP client), log in to your server as the system user your phpMyAdmin app belongs to (e.g., serverpilot) and navigate to your app directory, where APPNAME is the name of your app (we use phpmyadmin in this tutorial):
Drag the phpMyAdmin archive from your computer's Downloads folder and drop it into your app directory in Cyberduck.
Next, delete the public folder that currently resides in your app directory.
Then, click once on the phpMyAdmin archive and select Expand Archive from the Cyberduck File menu.
When the file has decompressed, delete the archive and rename the new phpMyAdmin folder to public.
Rename and Edit the Configuration File
Open the new public folder on your server and rename config.sample.inc.php to config.inc.php.
Now, open config.inc.php and set a random string of characters for
the value of
$cfg['blowfish_secret'] near the top of the
$cfg['blowfish_secret'] = 'asdof7q230984(*^3q4'
Logging In to phpMyAdmin
You should now be able to bring up phpMyAdmin through this subdomain (e.g., http://db.example.com) in your browser.
Again, you can easily access all of the databases on your server by signing in with their correct credentials through this singular phpMyAdmin installation and subdomain.
You can log in to phpMyAdmin using any database credentials (username and password) that you've created through ServerPilot for any app on this server.
Last updated: August 07, 2017