Some may wonder how do you access your database in RunCloud. We have been getting inquiries on how to install PHPMyAdmin, or where it is installed.
Well, there is none. And we don’t recommend that you install them.
You can read the full tutorial below, but first let me explain the main concept on how to go about with this.
To access your database, the MariaDB that we installed in your server, first you would need to establish a secure SSH connection to your server. This is where you use the terminal (on Mac and Linux) or Putty (on Windows). And then we can use any other MySQL client software to utilise the SSH connection to connect MariaDB. It will be like connecting to MariaDB from “inside” the same server.
This is what we call “tunneling”.
In my years on server administration and web development, I don’t quite like PHPMyAdmin because it is web-based. I am on a Windows computer so I use a software called HeidiSQL. If you are on Mac, you can use Sequel Pro. Both are free software.
And the good thing is that it comes built in with tunneling option, so you don’t have to establish your own SSH tunnel connection using Putty or the Terminal.
In this tutorial we will be accessing the database as root, meaning you have full access to the database. RunCloud notifies you of your MariaDB Root password at the end of the server connection process. Do you remember this screen? I hope you kept the details safe, and now we need to use them back again.
When we have this, we can launch our HeidiSQL. What you need to do is just enter the details for
- MySQL connection settings (use MYSQL ROOT Password)
- SSH Tunnel settings (use runcloud password)
This is the interface for creating a new database connection in Heidi SQL.
Make sure you select the “MySQL (SSH tunnel)” for Network type.
Then, enter your username (root) and password for MySQL. Make sure you enter “127.0.0.1” for host. And then, enter your password.
If you look at the top, you will see there is a tab labelled “SSH Tunnel”. If you don’t see it, make sure you selected “MySQL (SSH tunnel)” for your Network type. Click on that tab so we can set the SSH tunnel settings.
This is where you need your runcloud password. Enter your server IP address, runcloud for username and the password that was given to you during server connection process.
When the connection setup is complete, you can just double click on your new connection to connect to your database server. If all is good, you should see an interface that looks more or less like this.
You can start to explore your database now, and do the normal things that you do on PHPMyAdmin, only faster, more intuitive and easier. Just be careful because you are accessing real data in the database now. Be aware of the changes that you are making like adding new records, remove data, updating data and the rests.
All the best.
With RunCloud you can easily and securely manage all your web application databases, and do so much more. Why not sign up for a free trial today and see what our platform offers, we are confident you won’t look back.