How to Connect to MySQL with SSL Using MySQL Workbench


In this guide, we will enable remote connections to our MySQL database using SSL. Connections to our MySQL server will be secured and validated with X509 public certificate verification. Amezmo handles these details for you when you add a trusted IP address to your database settings.

Step 1 – Add a trusted IP address

From your Amezmo dashboard, navigate to Databases > Setttings and add a trusted IP address to your trusted sources list. Clicking on the text box will show you an autocomplete with your current IP address. Press the save button and the page will automatically refresh.

Enable trusted IP addresses to your MySQL server

Step 2 – Download your SSL certificate files

With the above step complete, your settings page will show 3 files that you must download.

SSL certificate file list

Step 3 – Configure MySQL Workbench

After you’ve downloaded your certificate files, launch MySQL Workbench and add a new connection. You can find your Amezmo connection parameters from Databases > Overview.

The following table is a mapping of Amezmo parameters to Workbench parameters. Note that your password is the same password that you use for your application database user.

Amezmo setting MySQL Workbench setting
SSL host Hostname
SSL port Port
SSL Username Username
Add a new connection to Workbench

Now click on the SSL tab in Workbench and add the SSL certificate files to the connection settings.

Now test your connection, and click Ok.

Focus on building PHP apps, not managing servers.

Experience the managed PHP cloud servicde from Amezmo and deploy using the tools you love like GitHub and GitLab.

Deploy Today for free
Read more about Help

Get More Done With Amezmo

Stop wasting time setting up boilerplate infrastructure. Amezmo makes it easy to deploy, scale and host your modern PHP application.