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 the 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”
Command Time – for example, 60
For the Connect Database keyword, click on the Set data button, to enter the data in the keywords.
Enter the data. Save it.
For the Execute Query keyword, enter the data and Save it.
Click on the Run button and click on Execute.
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.
MySQL database will connect successfully with Opkey when the result gets Passed.
Read more related articles on more databases by clicking Here
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article