Skip to main content

MySQL

MySQL is a powerful open-source relational database management system known for its speed, reliability, and flexibility, making it a popular choice for various applications and data-driven projects.

Configuring Connector

Prerequisites

  1. Authentication Credentials: Obtain the required credentials to connect to your MySQL instance. Choose from the following options:

    • MySQL database username and password.
    • AWS IAM authentication (for AWS-hosted MySQL databases).
  2. Connection Details:

    • Hostname of the MySQL database.
    • Port number for database access.
    • Database name within the MySQL host.
  3. Firewall Rules:

    • Set up firewall settings to allow DronaHQ (IP whitelist) access to your MySQL host.

Ensuring these prerequisites are in place will ensure a seamless integration of MySQL with DronaHQ, facilitating effective data management and utilization.

Connector Setup in DronaHQ

Configure your database category by providing the details below. Choose between User and Password or AWS IAM Authentication. Validate the connection using Test connection and Save settings for a secure and efficient database setup.

tip

DronaHQ can Auto fill crucial connection values like host, name, password, and more from the connector's connection string or from a AWS IAM credentials using AWS Import.

General

FieldDescription
HostEnter the Host Domain or IP
PortEnter the Port number
Database NameEnter the Database name
Authentication TypeChoose from User and Password or AWS IAM
UsernameEnter the Username
PasswordEnter the Password
AWS Access KeyEnter the AWS Access Key of your database.
AWS Secret KeyEnter the AWS Secret Key of your database.
AWS RegionEnter the AWS Region of your database.
Role to assume (ARN)Enter the role to be used while accessing API. Example - arn:aws:iam::123456789012:role/RoleName

|

MySQL with Sample details.
MySQL with Sample details.

Admin

Advanced OptionDescription
Connection OptionsThe key and value connection options in MySQL configuration refer to specific settings (keys) and their corresponding values that dictate how the application connects to the database
Use Dynamic Database HostDynamically determine the host for the database connection.
Use Dynamic Database NameSet the database name dynamically, allowing easy switching between databases.
Use Dynamic Database Credentials Enable dynamic database credentials for secure and convenient management.
Enable Converting Queries to Prepared Statement Opt for prepared statements to enhance database performance and security.
Connect using SSL Securely access the database using an encrypted SSL connection, ensuring data integrity and confidentiality.
Enable SSH Tunneling Securely access the database through encrypted SSH tunneling.
Whitelist IP Enhance security by restricting database access to specific whitelisted IP addresses.

Adding Database Queries

Once the connector is configured, access it in your Connector Library. Click Add query after connection setup. Create queries, run them, and view responses.

Write Queries
Write Queries
tip

Use double curly brackets for dynamic variables. Test with sample values before saving. Link dynamic variables to controls/actions for runtime use.

Saved queries appear under your connector in Connector Library.

Supported Query Operations

OperationsDescription
Raw SQL QueryVarious select, insert, delete, update, join operations.
Stored Procedure CallCall stored procedures e.g., CALL getUserInfo;

Using MySQL Connector

Data Bind using Data Query

Read/Display Data Query for MySQL:

Start by constructing an SQL query to extract data from your MySQL database. For instance, let's consider an example where you want to retrieve data from the Authors table based on specific initials. The SQL query is:

Query used:

SELECT * FROM Authors WHERE initials = "{{SearchInitials}}";

Query explanation:

This SQL query retrieves all rows and columns from the Authors table where the initials match the value provided through the dynamic variable {{SearchInitials}}.

Get data query with dynamic variable.
Get data query with dynamic variable.

Integrate the fetched data into your application's interface.

a. Access the Controls section and introduce the Table grid control.

b. Navigate to Data Bind Options -> Quick Select -> Database Queries.

c. Opt for the MySQL connector and choose the query that aligns with your data presentation goals.

By following these steps, you can seamlessly retrieve and display data from the Authors table based on specific initials using the MySQL Connector, enhancing your application's functionality and user experience.