Product docs
- Getting started
- Platform and account
- Products
- Product Overview
- Tengence Search
- Product Overview
- Use cases: which businesses Tengence Search fits
- Getting started
- Search Setup: App, Dataset, Index, First Query
- OpenSearch Spring Boot Starter Integration
- Elasticsearch Spring Boot Starter Integration
- Guides
- Index Concepts and Configuration Guide
- Index Schema Reference
- Search Ranking and Weighting Configuration
- Ranking Factors and Functions Reference
- Search Suggestions and Intervention Rules
- Developer reference
- Search API Reference
- Search API Integration and Examples
- Search Widget Integration
- Operations and support
- Search Operations and Monitoring
- Search Troubleshooting
- Query Rules and Query Intervention
- Search Log Collection Policy
- Query Understanding Configuration
- Tengence GEO
- Tengence Recommendation
- Tengence Insight
- Data Integration
- Integration and API
- Solutions
- Concepts and metrics
Sync from MySQL
Connect one MySQL table to a Tengence dataset. Choose full snapshot, scheduled or real-time incremental sync, map fields and verify records.
MySQL sync connects one table in an existing MySQL database to a Tengence dataset. It is built for business data that already lives in MySQL — orders, inventory, CRM records, price lists — and needs to be searchable or analyzable in Tengence without export scripts.
Tengence reads from MySQL and writes to a dataset. It does not write back to your source table. Choose a full snapshot for a one-time copy, scheduled incremental for periodic updates, or real-time incremental when changes must appear close to the source.
When to use MySQL sync
- Your source of truth is a MySQL table and you do not want to build a custom export job.
- You need product, order, inventory or customer data refreshed on a predictable schedule.
- You want Tengence Search or Tengence Insight to read the table without querying the production database at request time.
- You need near real-time updates and can enable row-based binlog on the source.
One table per app. If three tables must become one dataset, create three apps and three datasets, or prepare a single table that already contains the fields you need. MySQL sync does not join tables.
What you need before you start
| Item | What to enter | Notes |
|---|---|---|
| Database address | Hostname or IP address of the MySQL server | Do not paste a JDBC URL. The console builds the connection string. |
| Port | 3306 by default | Use the port your MySQL server listens on. |
| Database name | The schema that contains the table | Case-sensitive on Linux servers. |
| Username and password | A dedicated account for Tengence | Grant only the privileges required by the sync mode. Avoid root or an admin account. |
| Table name | One physical table | Match the exact table name. One table per app. |
| ID column | A stable, unique column | Examples: product_id, order_id, sku. It must be unique across rows. |
| Timestamp column | Required for scheduled incremental | A DATETIME or TIMESTAMP column that changes whenever the row changes. |
| Binlog | Required for real-time incremental | binlog_format must be ROW. |
| Network | Outbound access from Tengence to MySQL | If the server is behind a firewall, allow the connection and verify with Test connection. |
Choose a sync mode
| Mode | Best for | Source requirements | What it does |
|---|---|---|---|
| Full snapshot | First load, rebuilds, small or slowly changing tables | SELECT | Copies the whole table once when sync starts. Running it again clears the previously synced data and loads the table again. Changes made after the snapshot are not reflected until the next full run. |
| Scheduled incremental | Tables with a reliable last-updated timestamp | SELECT plus a timestamp column | Checks for rows whose timestamp is newer than the last run. DELETE operations are not synced; model removals as a soft-delete flag in the source row. |
| Real-time incremental | Dashboards and operational views that need near real-time changes | ROW binlog and SELECT, RELOAD, REPLICATION SLAVE, REPLICATION CLIENT | Reads binlog changes as they happen. Low load on the source table and low delay between source and dataset. |
Not sure which one to pick? Start with a full snapshot on a small table to validate credentials, mapping and preview. Then switch to scheduled or real-time incremental when the dataset looks right.
Create the MySQL app
- Open Data Integration → Apps. Select + New App, choose Free and select Create.
- On the app detail page, select Configure Data Source. Under Database, select MySQL.
- Enter the database address, port, database name, username, password and table name.
- Select Test connection. If it fails, fix the host, port, database, account or network before continuing.
- Select Next. The console reads the table columns and opens the sync mode step.
- Choose Full snapshot, Scheduled incremental or Real-time incremental.
- For scheduled incremental, set the interval and the last-updated time field. For real-time incremental, review the grant statement and select Test privileges.
- Select Next. In Field List, review source fields, dataset fields, types and comments.
- Mark exactly one field as the ID field. Hover the source field name and select Set as ID field (pin icon).
- Select Next. Add optional filter conditions, then select Create.
- Open the app detail and then Data Center → Datasets to confirm the first sync.

The values above are examples. Use the hostname, schema and table from your own environment. The password field is masked after entry.

Set up source privileges
Use a dedicated account. The narrowest grant depends on the mode:
Full snapshot and scheduled incremental
GRANT SELECT ON demo_catalog.products TO 'tengence_sync'@'%';
FLUSH PRIVILEGES;
Replace demo_catalog.products with your schema and table. Replace % with the narrowest host pattern allowed by your network policy.
Real-time incremental
GRANT SELECT ON demo_catalog.products TO 'tengence_sync'@'%';
GRANT RELOAD, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'tengence_sync'@'%';
FLUSH PRIVILEGES;
Replication privileges are global in MySQL, so real-time mode needs a broader grant than full snapshot. Set binlog_format=ROW before you start the sync. If your managed MySQL service exposes a binlog toggle, enable it in the provider console first.
Test privileges checks the account against the selected mode. A successful connection test does not prove that replication privileges are present.
Map fields and set the ID
The Field List step is where a MySQL column becomes a dataset field. Keep the dataset field names stable because Search, Insight and other products bind to them.
| Source field | Dataset field | Type | Role |
|---|---|---|---|
| product_id | product_id | BIGINT | ID field |
| product_name | title | VARCHAR | Display name |
| category | category | VARCHAR | Facet |
| price | price | DECIMAL | Filter and sort |
| stock_status | stock_status | VARCHAR | Availability |
| updated_at | updated_at | DATETIME | Incremental cursor |
- Exactly one ID field. The console rejects a mapping with zero or more than one ID field. A database primary key is marked Key, but you must still mark the ID field explicitly.
- Dataset field names must start with a letter, contain only letters, digits and underscores, and stay within 30 characters.
- Source fields cannot be repeated in one mapping.
- Delete removes a field from the dataset mapping; it does not drop the column from MySQL.

In the screenshot, product_id carries the Key tag. Hover its name and select Set as ID field so the dataset knows which value identifies a record.
Add filters (optional)
Filter conditions limit which rows are copied. All conditions are combined with AND. Available operators are equals, not equals, greater than, greater than or equal, less than, less than or equal, in list and not in list.
| Field | Operator | Value | Effect |
|---|---|---|---|
| stock_status | equals | in_stock | Only sellable products are synced. |
| price | greater than or equal | 100 | Skip low-value rows. |
| category | in list | sofa,chair | Sync two furniture categories only. |
Filters apply to the source query. If a row does not match, it is not written to the dataset. Keep filters simple and test the resulting record count against a SQL query with the same WHERE clause.
Verify the first sync
Open the app detail page and check four signals:
| Signal | Where to look | What good looks like |
|---|---|---|
| Run status | App detail header | Running for continuous modes, or a finished state after a snapshot. |
| Last synced | App detail | Recent for a running sync; the snapshot finish time for a full load. |
| Record count | App detail and dataset detail | Matches SELECT COUNT(*) with the same filters. |
| Preview | Data Center → dataset | Shows mapped dataset fields and sample rows, not raw source columns. |
For scheduled incremental, update one row in the source, wait for one interval, and confirm that Last synced moves and the changed value appears in Preview. For real-time incremental, make a small insert and watch the record count and preview.
Troubleshooting
| Symptom | Check first | Fix |
|---|---|---|
| Connection test failed | Host, port, database name, network allowlist | Use a hostname or IP, not a URL. Confirm the port is open from the Tengence side. |
| Access denied | Username, password, host grant | Grant the account from the host pattern Tengence connects from. |
| Test privileges failed | Missing SELECT or replication grants | Run the grant statement for the selected mode, then FLUSH PRIVILEGES. |
| Table not found | Database name and table name | Match case exactly; one table per app. |
| Record count is 0 | Empty table or restrictive filter | Run SELECT COUNT(*) with the same filter. Remove filters to isolate the cause. |
| Count is lower than expected | Filters or duplicate IDs | Compare the filtered count. Check that the ID column has no duplicates. |
| New changes do not appear | Full snapshot selected | A full snapshot runs once. Switch mode or run the sync again; a new full run clears and reloads the dataset. |
| Real-time sync does not start | binlog_format, grants | Set binlog_format=ROW and verify all four replication privileges. |
Billing and limits
MySQL sync consumes the storage quota of your Tengence package, not capacity on the source MySQL server. The Free package includes 2 GB in the current console. The app detail page shows Storage usage and Record count.
Full table size and update frequency determine how much storage and how much sync work you need. Start with one small table, confirm the record count, then add larger tables. For the full quota table, see Plans and usage.
FAQ
Does Tengence write to my MySQL database?
No. Tengence opens a read session and copies rows into a dataset. Real-time mode uses replication privileges to read binlog events, but it does not modify your table.
Can I sync several tables in one app?
No. One app maps one MySQL table. Create one app per table. If downstream products need a combined view, build that view before ingestion or bind the datasets separately.
Are deletes synced?
Scheduled incremental does not sync DELETE operations; use a soft-delete column and filter or interpret it in the consuming product. A full snapshot reflects deletes only when you run the snapshot again. Test delete behavior on a small table before you rely on real-time mode for removals.
Can I change the sync mode later?
Yes. Open the app detail and use Switch sync mode. Review the impact first: a new full snapshot clears the data previously synced by that app and reloads the table, while scheduled incremental does not backfill rows that were deleted in the source.
Do I have to use the primary key as the ID field?
No, but you must mark exactly one field as the ID field, and its values must be unique. A stable business key such as product_id or order_id is usually a better choice than an auto-increment value that can change across environments.
How often can scheduled incremental run?
Preset intervals start at 30 seconds. A custom interval can be from 1 to 120 minutes. Choose the longest interval that still meets the freshness requirement of the consuming product.
Where do I see sync errors?
Connection, privilege and table errors appear in the configuration wizard or on the app detail page. Record-level issues appear when you compare the dataset preview with the source query.
On this page
- When to use MySQL sync
- What you need before you start
- Choose a sync mode
- Create the MySQL app
- Set up source privileges
- Full snapshot and scheduled incremental
- Real-time incremental
- Map fields and set the ID
- Add filters (optional)
- Verify the first sync
- Troubleshooting
- Billing and limits
- FAQ
- Does Tengence write to my MySQL database?
- Can I sync several tables in one app?
- Are deletes synced?
- Can I change the sync mode later?
- Do I have to use the primary key as the ID field?
- How often can scheduled incremental run?
- Where do I see sync errors?