Monitor MySQL Binlog logs in real time using Maxwell components

Source: Internet
Author: User
Tags mysql insert

One: Install and deploy MySQL in a Linux environment.

Open Binlog

Vim/etc/my.cnf

There are 3 binlog formats for MySQL, in order to parse Binlog into JSON data format, the format of Binlog to be set to row (Binlog has three formats: Statement, row, and mixed)

3 Restart MSYQL Service

Service mysqld Restart

See if Binlog is turned on

See if Binlog is turned on to row mode

/var/lib/mysql See generated the corresponding Binlog listening log file, master.000001 file, each restart MSYQL service, will generate a new listening file

Configuring Maxwell-related deployment work

1 Downloads Maxwell

Website

http://maxwells-daemon.io/

Installing TAR–ZXVF maxwell-1.14.4.tar.gz

Create DB and user for Maxwell

Create Database Maxwell;

GRANT all on maxwell.* to ' Maxwell ' @ ' percent ' identified by ' 123456 ';

GRANT SELECT, REPLICATION CLIENT, REPLICATION SLAVE on * * to ' Maxwell ' @ '% ';

Flush privileges;

3.5 Test stdout:

Bin/maxwell--user= ' Maxwell ' \

--password= ' 123456 '--host= ' 127.0.0.1 ' \

--producer=stdout

Test:

MySQL Insert data:

Insert into demo (id,name,age,address) VALUES (999, ' Jepson ', ' www.ruozedata.com ');

Maxwel

Monitor to Data

Use Maxwell components to monitor MySQL Binlog logs in real time

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.