In this tutorial, we'll show you how to install phpMyAdmin.
This tutorial assumes you have already connected your server to ServerPilot and that you have created at least one app on the server.
The steps to install phpMyAdmin will be:
- Download the phpMyAdmin archive to your laptop
- Upload the archive to an app on your server
- Extract the archive
- Rename the phpMyAdmin directory for security reasons
- Configure phpMyAdmin
Download phpMyAdmin Then Upload To Your Server
First, you will need to set an SSH/SFTP/SCP password for this server's "serverpilot" user.
To set the SSH/SFTP password for this user, click on the "System User" link on your app's details page, as shown below. In this screenshot, the app's name is "wordpress".
You'll then see a page where you can set the SSH/SFTP password.
Next, download to your local computer (for example, your laptop) the most recent ".tar.gz" archive from http://www.phpmyadmin.net/home_page/downloads.php. Unfortunately, there is no easy way for us to link directly to the current phpMyAdmin archive. The file will be named something like phpMyAdmin-4.X.Y-all-languages.tar.gz where X and Y are version numbers.
Next, upload the file to your server. You can use SFTP or SCP. Using a command line SCP client, this would look like the following (use your server's IP address instead of 18.104.22.168):
scp phpMyAdmin-4.X.Y-all-languages.tar.gz firstname.lastname@example.org:apps/myapp/public
Extract and Secure phpMyAdmin
Next, SSH in to your server and extract the archive.
ssh email@example.com cd apps/myapp/public tar xzf phpMyAdmin-4.X.Y-all-languages.tar.gz
IMPORTANT: Now rename the phpMyAdmin directory to something hard-to-guess. In this example, we used a random string "F24PG9C3" but you should make up your own.
mv phpMyAdmin-4.X.Y-all-languages phpmyadmin-F24PG9C3
Next, create the phpMyAdmin configuration file.
cd phpmyadmin-F24PG9C3 cp config.sample.inc.php config.inc.php
Finally, edit the configuration file config.inc.php and set a random
string for the value of
the top of the file.
Logging In To phpMyAdmin
You should now be able to bring up phpMyAdmin at your server's IP address (e.g. http://22.214.171.124/phpmyadmin-F24PG9C3/) in your browser. If you have more than one app on your server, use a domain name that belongs to your app rather than your server's IP address.
You can log in to phpMyAdmin using any database user and password that you've created through ServerPilot for any app on this server.