es sync mysql Sync

Source: Internet
Author: User
Tags kibana logstash

1. Download ES

Https://www.elastic.co/downloads/elasticsearch

Modify configuration under config elasticsearch.yml IP and port

2. Download Kibana

Https://www.elastic.co/downloads/kibana

Modify configuration under config kibana.yml IP and port es, etc.

3. Download Logstash

Https://www.elastic.co/downloads/logstash

Download Jar Mysql-connector-java-5.1.47.jar

Add file under Config jdbc.conf

Input {stdin {} jdbc {# mysql JDBC connection string to our backup databse jdbc_connection_string =& Gt      "Jdbc:mysql://localhost:3306/testguize" # The user we wish to excute our statement as Jdbc_user = "Chai" Jdbc_password = "Chai" # The path to our downloaded JDBC driver jdbc_driver_library = "E:\elasticsearc H6.1\mysql-connector-java-5.1.26.jar "# The name of the driver class for MySQL Jdbc_driver_class =" com.mysq  L.jdbc.driver "jdbc_paging_enabled =" true "Jdbc_page_size =" 50000 "statement =" SELECT * FROM User "# Statement_filepath =" F:\FullText\logstash-6.3.2\config\jdbc.sql "schedule =" * * * * * * "t  ype = "Lxuser"}}filter {json {Source = "message" Remove_field = = ["Message"]}}output        {elasticsearch {hosts = "192.168.0.61:9200" # port = "9200" # protocol = "HTTP" index = "MysQL "document_id ="%{id} "# cluster =" Fulltext-application "} stdout {codec = JSO N_lines}}

4. Start ES

Elasticsearch Download Directory bin directory Elasticsearch.bat

5. Logstash Bin directory

Execute command logstash.bat-f. \config\jdbc.conf6. Starting the Kibana test ES connection

es sync mysql Sync

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.