MariaDB as Source
Capture
Fivetran HVR supports capturing changes from MariaDB database. This section describes the configuration requirements for capturing changes from MariaDB database. For the list of supported MariaDB versions from which HVR can capture changes, see Capture changes from location in Capabilities.
Capture Methods
HVR allows the following methods for capturing (Capture) changes from MariaDB:
In terms of capture speed and database resource consumption, there is not much difference between using SQL or DIRECT method for capturing from a MariaDB location. By default, HVR captures changes from MariaDB using the SQL capture method (Capture_Method=SQL).
Direct Binary Log Reading
In this capture method (Capture_Method=DIRECT), HVR reads transaction log records directly from the DBMS log file using the file I/O. This capture method requires:
- an HVR Agent to be installed on the MariaDB source database server.
- the operating system user under which the HVR is running must have permission to read from the binary log files.
Binary Logs via SQL
In this capture method (Capture_Method=SQL), HVR captures changes over an SQL connection. The benefits of this capture method are the ability to:
- capture from a local/remote database without using an HVR Agent.
- run with minimal OS and database privileges.
Grants for Capture
This section lists the grants required for capturing changes from MariaDB database.
- To capture changes from MariaDB, the HVR database User must be granted the following privileges:
grant replication client on *.* to 'username'@'%' ; grant replication slave on *.* to 'username'@'%' ; grant select on *.* to 'username'@'%' ;
Configuration for Binary Logging
In MariaDB, the transaction updates are recorded in the binary logs. For HVR to capture changes, the binary logging should be configured in MariaDB database. MariaDB allows you to define system variables (parameters) at server level (global) and at session level. The configuration for binary logging should be strictly defined as mentioned in this section. Defining parameters not mentioned in this section may lead to HVR not capturing changes.
For more information about binary logging, search for "binary logging" in MariaDB Documentation.
If binary logging is not enabled in MariaDB, a similar error is displayed in HVR: "hvrinit: F_JD0AC8: The 'SHOW MASTER STATUS' command returned no results. Please check that the binary logging is enabled for the source database. F_JR0015: The previous error was detected during generation of objects for channel hvr_demo. It is possible that objects have been left incomplete."
The following parameters should be defined in MariaDB configuration file my.cnf (Unix) or my.ini (Windows):
- log_bin=ON - to enable binary logging in MariaDB.
- binlog_format=ROW - to set the binary logging format.
- binlog_row_image=full or binlog_row_image=noblob - to determine how row images are written to the binary log.
binlog_row_image=minimal is not supported by HVR.
Compare and Refresh from MariaDB
HVR allows you to perform only Compare and Refresh from MariaDB database (without using Capture). This section describes the configuration requirements for performing only Compare and Refresh from MariaDB database.
Grants for Compare and Refresh from MariaDB
This section lists the grants required for performing only Compare and Refresh from MariaDB database.
- To read from the MariaDB database, the HVR database User must be granted the following privilege:
grant select on table_name to username;