Difference between revisions of "MariaDB binary log"

From wikieduonline
Jump to navigation Jump to search
Line 7: Line 7:
 
  --[[log-bin]]=[[/your/path/]]mariadb-bin
 
  --[[log-bin]]=[[/your/path/]]mariadb-bin
 
  [[--log_bin_compress]]
 
  [[--log_bin_compress]]
 +
 +
 +
== Steps ==
 +
* Define file name for your binary logs or full path including the name in <code>[[log_bin]]<code> option,[[/etc/mysql/mariadb.conf.d/50-server.cnf]]</code>
 +
 +
* Make sure path to your file is owned by <code>[[mysql.adm]]<code>: <code>[[chown]] [[mysql.adm]] [[/your/path/]]</code>
 +
 +
* Restart your db: <code>[[service mariadb restart]]</code>
  
 
== Config ==
 
== Config ==

Revision as of 14:02, 19 February 2023

--log-bin=your-log-binname


--log-bin=mariadb-bin
--log-bin=/your/path/mariadb-bin
--log_bin_compress


Steps

Config

cat /etc/mysql/mariadb.conf.d/50-server.cnf | grep log_bin
#log_bin                = /var/log/mysql/mysql-bin.log
cat /etc/mysql/mariadb.conf.d/50-server.cnf | grep binlog
max_binlog_size   = 100M
#binlog_do_db		= include_database_name
#binlog_ignore_db	= exclude_database_name

Format

Slave

STOP SLAVE;
SET GLOBAL slave_parallel_threads=0;
SET GLOBAL binlog_format='ROW';
SET GLOBAL slave_parallel_threads=4;
START SLAVE

Related

Activities

See also

Advertising: