To Connect MySQL Database through ODBC Driver

Opkey features a built-in database connectivity engine, which facilitates various database operations.  

This article will guide you on how you can connect to MySQL Database through ODBC Driver. 

 


Follow the below steps for ODBC Configuration for MySQL Database: 

 
Search for ODBC Data Source 64-bit in the Start Menu on your system.

 
Open Run as admin. 

 

The MySQL Connector/ODBC screen will open. 

 

Navigate to the "System DSN" tab and click on "Add." This will bring up the option to select MySQL driver on the screen. 

 


Select MySQL ODBC Driver from the options and click on Finish. 


 


Fill in all the details of the following fields on the next screen: 

 

Data Source Name: MySQL  

Description: MySQL 

IP: localhost 

Port: 3306  

User: Root;  

Password of MySQL,  

Select database to work on, and then click OK  followed by clicking on Test Connection. 

 

 


 

The connection is now successfully established. 


How to Connect MySQL through Opkey:  

 

Go to Opkey and create a test case on the respective project. 

Add following keywords to the test case: 

 

Connect Database: Enter Input values of  

Driver – System.data.odbc 

Connection String – DSN=MySQL 

 

Execute Query

Enter the Input Values of  

Query – Sample Query :- Select version ();

Command Time – for example, 60 

 




Click on the Run button and click on Execute.

 


Enter details on the Local Execution Wizard. Click on Finish.



Post execution view the Result.

 


 


 

When the connection is established, both queries will be executed, and the results will be displayed as either True or False. 


 



You now have MySQL successfully connected with Opkey. 


To learn about more Opkey database operations, click Here.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article