If you are working with a MySQL database as part of your project, you’ll probably need to add or edit data. We recommend using an SQL client to do so. In this guide, we’ll walk you through how to connect to your MySQL database using an SQL client.
In order to connect to your database, you’ll need to get your MySQL credentials. These include:
localhost
or 127.0.0.1
. If your MySQL database is not hosted on your local network, you’ll need the public ip address/hostname of the server on which it is hosted. One way to do this is to run SHOW VARIABLES WHERE Variable_name = 'hostname'
from your MySQL server’s command lineSHOW VARIABLES WHERE Variable_name = ‘port’
For this guide, we’ll be using Arctype, where you can simply click Add a new data source
or Add connection
and choose ‘MySQL’ to begin:
Next, enter your credentials that we gathered above:
Once you’re connected, you can easily interact with your MySQL data: