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.
Pre-Requisites to connect MySQL through ODBC driver
Verify agent machine and database location connectivity before using Opkey.
Ensure the agent machine has the required ODBC installation, which is essential for performing tasks with Opkey.
Confirm the MySQL database version and match the ODBC driver for compatibility. Obtain the correct version online or consult your IT Department.
Follow the below steps for ODBC Configuration for MySQL Database:
Search for ODBC Data Source 64-bit on the Start Menu
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 on 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 Keyword to the test case:
Connect Database: Enter Input values of
Driver – System.data.odbc
Connection String – DSN=MySQL
Save it.
Execute it to view the Result
Add Keyword – Execute Query:
Enter the Input Values of
Query – “Sample Query”
Command Time – for example, 60
Save It.
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 features, 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
Feedback sent
We appreciate your effort and will try to fix the article