Connecting to Your Database
Once you have created a database in SpinupWP you can manage the database in two ways: using the command line (CLI) or using a desktop app.
Using the CLI
To manage the database using the command line first you need to SSH to your server:
ssh user@123.456.78.91
Once you are logged into your server you can manage databases using the mysql
command. To log in using mysql
run:
mysql -u dbuser -p
You will be prompted for your database user’s password. You can now manage your databases.
Using an App
The most convenient way to access and manage your database is using a desktop app via SSH. We recommend TablePlus, which supports macOS, Windows and Linux. TablePlus offers a free trial which is limited to 2 opened tabs and 2 opened windows at a time, but you can upgrade to a paid license to unlock all functionality.
With TablePlus, you enter your SSH connection credentials (the same credentials you use to SSH into your server) AND your database connection info.
- The MySQL Host will always be
127.0.0.1
. - The MySQL Port will always be
3306
. - The database Username and Password will be what you entered when you created your site.
- The SSH Host is the IP address of your server.
- The SSH User is a sudo user or site user from your server.
- If the SSH user is using key based authentication, select Use SSH key. Otherwise, enter your SSH password.
- Leave the rest of the settings as their defaults.
Note that you can use the “root” database login and password (specified when you spun up your server) if you want to access all the databases on your server with one login.
phpMyAdmin
Although you’re free to manually install phpMyAdmin yourself, we do not recommend it. It is far less secure than accessing your database using a remote client app via SSH as described above.