lib/fluent/plugin/in_mysql_query.rb in fluent-plugin-mysql-query-1.0.0 vs lib/fluent/plugin/in_mysql_query.rb in fluent-plugin-mysql-query-1.0.1
- old
+ new
@@ -7,10 +7,11 @@
helpers :timer
config_param :host, :string, default: 'localhost'
config_param :port, :integer, default: 3306
+ config_param :socket, :string, default: nil
config_param :username, :string, default: 'root'
config_param :password, :string, default: nil, secret: true
config_param :database, :string, default: nil
config_param :encoding, :string, default: 'utf8'
config_param :interval, :time, default: '1m'
@@ -53,9 +54,10 @@
def get_connection
begin
return Mysql2::Client.new({
host: @host,
port: @port,
+ socket: @socket,
username: @username,
password: @password,
database: @database,
encoding: @encoding,
reconnect: true