File tree 3 files changed +70
-2
lines changed
3 files changed +70
-2
lines changed Original file line number Diff line number Diff line change
1
+
2
+
1
3
[MySQL ]
2
4
mysql_host = " "
3
5
mysql_port = 3306
4
6
mysql_username = " "
5
7
mysql_password = " "
8
+
9
+ # hosted_in_aws_rds: Optional.
10
+ #
11
+ # Uses "CALL mysql.rds_kill()" instead of "kill" command.
12
+ # Useful in RDS databases or replica where
13
+ # "mysql_username" may not have privilege to use "kill"
6
14
hosted_in_aws_rds = false
15
+
16
+ # db: Optional.
17
+ #
18
+ # If provided, filter out long running
19
+ # queries from other databases
7
20
db = " "
8
21
9
22
[ssh_tunnel ]
12
25
ssh_port = 22
13
26
ssh_username = " "
14
27
ssh_password = " "
28
+
29
+ # ssh_private_key takes priority over ssh_password
30
+ # if both are provided
15
31
ssh_private_key = " "
32
+
33
+ # ssh_key_passphrase: Optional.
16
34
ssh_key_passphrase = " "
17
35
18
36
[long_running_query ]
37
+ # Default is 10 seconds.
38
+ # kill-mysql-query will only list running queries
39
+ # those are being executed for more than or equal to
40
+ # this value.
19
41
timeout_second = 10
42
+
Original file line number Diff line number Diff line change @@ -126,14 +126,14 @@ func Generate(file string) error {
126
126
}
127
127
}
128
128
129
- config := setDefault ()
130
129
f , err := os .Create (filePath )
131
130
defer f .Close ()
132
131
if err != nil {
133
132
return err
134
133
}
135
134
136
- if err := toml .NewEncoder (f ).Encode (config ); err != nil {
135
+ _ , err = f .WriteString (baseConfig )
136
+ if err != nil {
137
137
return err
138
138
}
139
139
Original file line number Diff line number Diff line change
1
+ package configuration
2
+
3
+ var baseConfig = `
4
+
5
+ [MySQL]
6
+ mysql_host = ""
7
+ mysql_port = 3306
8
+ mysql_username = ""
9
+ mysql_password = ""
10
+
11
+ # hosted_in_aws_rds: Optional.
12
+ #
13
+ # Uses "CALL mysql.rds_kill()" instead of "kill" command.
14
+ # Useful in RDS databases or replica where
15
+ # "mysql_username" may not have privilege to use "kill"
16
+ hosted_in_aws_rds = false
17
+
18
+ # db: Optional.
19
+ #
20
+ # If provided, filter out long running
21
+ # queries from other databases
22
+ db = ""
23
+
24
+ [ssh_tunnel]
25
+ use_ssh_tunnel = false
26
+ ssh_host = ""
27
+ ssh_port = 22
28
+ ssh_username = ""
29
+ ssh_password = ""
30
+
31
+ # ssh_private_key takes priority over ssh_password
32
+ # if both are provided
33
+ ssh_private_key = ""
34
+
35
+ # ssh_key_passphrase: Optional.
36
+ ssh_key_passphrase = ""
37
+
38
+ [long_running_query]
39
+ # Default is 10 seconds.
40
+ # kill-mysql-query will only list running queries
41
+ # those are being executed for more than or equal to
42
+ # this value.
43
+ timeout_second = 10
44
+
45
+ `
You can’t perform that action at this time.
0 commit comments