This topic describes how to configure Logtail in the Log Service console to collect MySQL query results.
Prerequisites
Implementation
Logtail executes the specified SELECT statement at a regular interval based on the Logtail configurations, and then uploads the query results to Log Service.
When Logtail obtains a query result, Logtail saves the value of the CheckPoint field in the local server. The next time Logtail executes the SELECT statement, it adds the saved value of the CheckPoint field to the SELECT statement. In this way, Logtail collects the incremental data of MySQL databases.

Features
- Supports MySQL databases.
- Allows you to paginate query results.
- Allows you to set time zones.
- Allows you to set timeout periods.
- Allows you to record synchronization statuses by using the checkpoint mechanism.
- Supports SSL.
- Allows you to set the maximum size of data that can be collected at a time.
Scenarios
- Collect incremental data based on specific marks such as an auto-increment ID or a point in time.
- Customize data synchronization based on specified filtering conditions.
Procedure
Modify the configurations on the server where Logtail is installed
If you did not configure real information for the Host, User, Password, and other parameters under the inputs field, you can modify the parameters after the configurations are synchronized to the server where Logtail is installed.
What to do next
- Schema
CREATE TABLE `VersionOs` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `time` datetime NOT NULL, `version` varchar(10) NOT NULL DEFAULT '', `os` varchar(10) NOT NULL, `count` int(11) unsigned NOT NULL, PRIMARY KEY (`id`), KEY `timeindex` (`time`) )
- Sample log entry
"count": "4" "id: "721097" "os: "Windows" "time: "2017-08-25 13:00:00" "version": "1.3.0"