When I was half-a-little, I looked for information. Finally, find him in an official document ...
Http://www.rsyslog.com/doc/ommysql.html
Sample:
The following sample writes all syslog messages to the database "syslog_db" on mysqlsever.example.com. The server is being accessed under the account of "user" with password "pwd".
$ModLoad Ommysql
* * Action (type= "Ommysql" server= "mysqlserver.example.com" serverport= "1234"
db= "syslog_db" uid= "user" pwd= "pwd")
Legacy Sample:
The same as above, but in Legacy config format (pre rsyslog-v6):
$ModLoad Ommysql
$ActionOmmysqlServerPort 1234 # Use non-standard port
*. *: Ommysql:mysqlserver.example.com,syslog_db,user,pwd
I realized it in the second way.
The first kind does not have the error, but the log display does not come out, temporarily does not engage.
How does the Rsyslog ommsql module connect to MySQL's non-standard database ports?