In the first of our mini tutorial series, we will demonstrate how to define a database connection in Navicat. In this case it is a MySQL database located on a Dreamhost server in the US which has a mirror of this blog.
Dreamhost is one of the web and cloud hosting companies preferred by Arcler, and aside from the great customer support, they have some cool features many hosting and cloud service companies still neglect at present, such as free SSL certificate issuing and installation, free version control system repositories, and SSH access.
Defining the hostname
First things first: we define a new hostname for the database server at the database hosting side beforehand.
In this case, from the Dreamhost control panel, we define a new server name as mysql.arcler-it.com for the database server. Dreamhost leaves it up to the user what hostname(s) the database server shall have and you can define as many server names as you want for the same server.
Providing remote access privilege to database user
The next thing we want to do is to make sure that the database server accepts remote connections. For this, we need to grant access to the database user to connect to the server from a client (in this case Navicat) with our current IP address. The steps are illustrated by the following screenshot taken on the Dreamhost control panel:
Defining the connection in Navicat
Now that all the access information for the database is clear, time to enter them in Navicat connection properties.
Whilst in Navicat, click the File menu and select New Connection… and then select the type and platform of your database. In our case we are using Navicat Premium which supports multiple databases and major platforms. We are dealing with a remote MySQL server at this time, however.
Next we define the properties of the connection as appointed in the previous section, and illustrated in the following screenshot:Finally we simply hit the “Test Connection” button, and a small round green light appears next to the button in the event of a successful connection getting established. After that all we need to do is to double-click the connection name we defined listed in the left sidebar pane, and we are done!