Device Configuration: Windows MySQL Server
Login on Windows MySQL Server
Download the latest version of nxlog. It is easiest to choose the Windows msi file which includes an installer:
http://nxlog.org/products/nxlog-community-edition/download
3. Open the Nxlog configuration file at:
C:\Program Files (x86)\nxlog\conf\nxlog.conf
4.Use below mentioned nxlog config to configure windows MySQL log from MySQL server(replace nxlog.conf whole file content from below config ):
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
##################################################
## This is a sample configuration file. See the nxlog reference manual about the
## configuration options. It should be installed locally and is also available
## online at http://nxlog.org/nxlog-docs/en/nxlog-reference-manual.html
## Please set the ROOT to the folder your nxlog was installed into,
## otherwise it will not start.
#define ROOT C:\Program Files\nxlog
define ROOT C:\Program Files (x86)\nxlog
Moduledir %ROOT%\modules
CacheDir %ROOT%\data
Pidfile %ROOT%\data\nxlog.pid
SpoolDir %ROOT%\data
LogFile %ROOT%\data\nxlog.log
<Extension syslog>
Module xm_syslog
</Extension>
<Input dbi>
Module im_file
File "C:\\Windows\\MySQL.log"
SavePos TRUE
InputType LineBased
</Input>
<Output dbi_out>
Module om_udp
Host CCE_IP_ADDRESS
Port 514
Exec $SyslogFacilityValue = 2;
Exec $SourceName = 'mysql_logs';
Exec to_syslog_bsd();
</Output>
<Route dbi>
Path dbi => dbi_out
</Route>