MySQL

The most popular open-source relational database, perfect for web applications and data validation workflows.

Overview

MySQL is a reliable, open-source SQL database widely used for web applications, e-commerce platforms, and data-driven systems. The Data Testing connector provides seamless integration for validating MySQL data across environments.

circle-check

βš™οΈ Configuration Parameters

Parameter
Description
Required
Example

Host URL

Server address or hostname

βœ… Yes

mysql-prod.example.com

Port

MySQL connection port

βœ… Yes

3306

Database Name

Target database

βœ… Yes

production_db

Username

Database user

βœ… Yes

validator_user

Password

Authentication credential

βœ… Yes

β€’β€’β€’β€’β€’β€’β€’β€’β€’β€’

Query

SQL SELECT statement

βœ… Yes

See examples below

Configuration Screenshot

MySQL Configuration

πŸ“– Getting Started

Step 1: Gather Connection Details

Obtain these details from your database administrator:

  • βœ… MySQL server hostname/IP

  • βœ… Connection port (default: 3306)

  • βœ… Database name

  • βœ… Username (preferably read-only)

  • βœ… User password

  • βœ… Network access (firewall rules)

Step 2: Create Read-Only User

circle-exclamation

Step 3: Configure the Connector

  1. Navigate to your job configuration

  2. Select MySQL as the data source

  3. Fill in all connection parameters

  4. Click Test Connection

  5. Write your data query

  6. Click Verify Query

Step 4: Write Your Query

See SQL Query Examples section below.


πŸ“ SQL Query Examples

Basic Select Query

Filtered Query with Aggregation

Join Multiple Tables

Date-Based Partitioning


πŸš€ Features & Capabilities

Pagination Support

Enable pagination controls for large datasets:

Alignment Keys for Comparisons

Specify keys for matching rows during Compare jobs:

circle-info

Choose columns that uniquely identify records:

  • Single key: id, email, reference_id

  • Composite key: customer_id, order_id

  • Natural key: email (if unique)

Query Optimization Tips

Optimization
Benefit
Example

Add WHERE clause

Reduce data volume

WHERE status = 'active'

Use indexes

Faster execution

Ensure columns have indexes

Projection

Less data transfer

SELECT id, name not SELECT *

Limit results

Reduce memory

LIMIT 100000

Avoid functions

Better index usage

Compare raw values


πŸ” Security Best Practices

circle-exclamation

SSL/TLS Connection


πŸ› Troubleshooting

Issue
Solution

Connection refused

Check host, port, firewall rules

Authentication failed

Verify username/password, check user permissions

Query timeout

Add WHERE clause, use LIMIT, check indexes

No data returned

Verify table/column names, check WHERE conditions

Memory errors

Reduce result set size, use pagination

Permission denied

Ensure user has SELECT grant on database


πŸ“Š Performance Considerations

Large Dataset Handling

For datasets exceeding 1 million rows:

Index Strategy


πŸ’Ύ Maintenance Tips

Task
Frequency
Benefit

Update statistics

Weekly

Improves query planning

Rebuild indexes

Monthly

Optimizes performance

Check table integrity

Weekly

Detects corruption early

Monitor slow queries

Ongoing

Identifies bottlenecks

Review permissions

Quarterly

Maintains security



FAQ

Q: What port does MySQL use? A: Default is 3306, but verify with your administrator.

Q: Can I use MySQL over the internet? A: Yes, but ensure network security and use encrypted connections.

Q: What's the query result size limit? A: No hard limit, but large results may cause timeouts.

Q: Can I validate encrypted columns? A: Validation happens at the database level post-decryption.

Q: Do I need superuser access? A: No, read-only SELECT permissions are sufficient.

Last updated