How to Connect to MySQL Database

This guide assumes that you have already installed the MyODBC Driver onto your computer.

If you don’t have the MyODBC Driver on your computer, follow these steps to install it:  

Installing MyODBC Driver

  • Download MyODBC connector to your desktop computer making sure to select the appropriate installation file for your version of Windows. (Probably Windows Driver Installer (MSI))
  • After downloading, double click on mysql-connector-odbc-5.2.2-win32.msi.
  • When the MySQL Connector/ODBC 5.2.2 – Setup Wizard window appears, click Next.
  • Select the “Typical” installation & click Next.
  • Click Install and wait for the installation to finish. Click Finish.

Congratulations! You have successfully installed MySQL Connector/ODBC.

After you installed MySQL Connector 32-bit on Windows 7 64-bit machine, click Start -> Run and execute this command C:\Windows\SysWOW64\odbcad32.exe 

Now you must allow the computer where G-Lock EasyMail is installed to access your MySQL database by adding its IP address to the list of allowed hosts for your MySQL database. 

Adding MySQL Access Hosts

  • Open your Internet browser.
  • Open the cPanel on the remote web server where your MySQL database is located
  • Click on MySQL Databases link
  • Scroll down the page and find “Access Hosts” section
  • Enter the IP address of the computer where G-Lock EasyMail 6 is installed
  • Click Add Host
  • Close your browser

Now you must create a user DSN for MySQL driver in the ODBC Data Source Administrator. 

Creating User DSN for MySQL Driver

  • Click Start -> Settings -> Control Panel
  • Double click the mouse on Administrative Tools in the Control Panel
  • Double click the mouse on Data Sources (ODBC)
  • On ODBC Data Administrator (User DSN tab) click Add
  • Select MySQL ODBC 5.1 Driver
  • Click Finish
  • On the Connector/ODBC screen type Data Source Name,  your MySQL server name, your username and password to connect to MySQL server, and your MySQL database name
  • Click Test
  • Click OK if the test passes
  • Click OK to close the Connector/ODBC screen
  • Click OK to close the ODBC Data Source Administrator screen.

Now you are ready to connect to your MySQL database using G-Lock EasyMail 6. 

Connecting to MySQL Database Using G-Lock EasyMail 

  • Open G-Lock EasyMail v6
  • Click on the Address Book button on the toolbar.
  • Click on New Link to Database icon
  • Type a name for your database link
  • Click Select Database button
  • On the Data Link Properties screen select Microsoft OLE DB Provider for ODBC Drivers
  • Click Next
  • Select your data source name
  • Click on Test Connection button
  • Click OK if the test passes
  • Click OK to close the Data Link Properties screen
  • On the Database Manager screen select the Table Name from your MySQL database.
  • Map the fields from your MySQL database to the respective fields in G-Lock EasyMail. To do this, click the mouse in the Mapped Field column and select a field name. The Email field is required for mapping. 
  • Click OK to save the settings.

Success! To see how the data from your MySQL database is displayed in G-Lock EasyMail, put the cursor on your database name in My Databases section at the left pane.