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