One, create a syslog database
mysql> CREATE DATABASE Syslog character set UTF8;
mysql> use Syslog; Mysql> CREATE TABLE systemevents (ID int unsigned NOT NULL auto_increment primary key, Cus Tomerid bigint, Receivedat datetime null, devicereportedtime datetime NULL, facility S
Mallint NULL, Priority smallint NULL, fromhost varchar (a) null, message text, ntseverity int NULL, importance int NULL, EventSource varchar (a), Eventuser Varc
Har () null, eventcategory int NULL, EventID int NULL, eventbinarydata text null, maxavailable int NULL, currusage int NULL, minusage int NULL, maxusage int NU
LL, Infounitid int NULL, Syslogtag varchar (m), Eventlogtype varchar (60), Genericfilename VarChar, SystemID int NULL);
Mysql> CREATE TABLE systemeventsproperties (ID int unsigned NOT NULL
Auto_increment primary KEY, Systemeventid int null, paramname varchar (255) NULL, Paramvalue text NULL);
Second, set database permissions
Mysql> GRANT all on syslog.* to syslog_ng@localhost identified by ' Syslog_ngpass ';
mysql> FLUSH privileges;