Web lists-archives.com

Re: Mysql Syslog client.




Hi Stephan,

I've already tried syslog but it works fine in my environment.

$ /usr/mysql/5.7.6/bin/mysql --syslog -h 192.168.198.214 -u yoku
mysql> show databases;
Mar 13 11:27:57 dev-personal-04 MysqlClient: SYSTEM_USER:'ttanaka',
MYSQL_USER:'yoku', CONNECTION_ID:9, DB_SERVER:'192.168.198.214',
DB:'--', QUERY:'show databases;'

$ /usr/mysql/5.7.6/bin/mysql -h sys-db02 -P 3307 -u yoku --syslog
mysql> status
Mar 13 11:30:01 dev-personal-04 MysqlClient: SYSTEM_USER:'ttanaka',
MYSQL_USER:'yoku', CONNECTION_ID:17818, DB_SERVER:'sys-db02', DB:'--',
QUERY:'status'

mysql> show databases;
Mar 13 11:30:03 dev-personal-04 MysqlClient: SYSTEM_USER:'ttanaka',
MYSQL_USER:'yoku', CONNECTION_ID:17818, DB_SERVER:'sys-db02', DB:'--',
QUERY:'show databases;'

$ /usr/mysql/5.7.6/bin/mysql -S /usr/mysql/5.7.6/data/mysql.sock -u
root --syslog
mysql> select current_user();
Mar 13 11:30:24 dev-personal-04 MysqlClient: SYSTEM_USER:'ttanaka',
MYSQL_USER:'root', CONNECTION_ID:10, DB_SERVER:'--', DB:'--',
QUERY:'select current_user();'


mysql command line client's --syslog sends log to local(client
machine)'s syslogd.


yoku0825,

2015-03-13 3:59 GMT+09:00 Stephan Gomes Higuti <higuti.sam@xxxxxxxxx>:
> Hello guys.
>
> Im using MySQL 5.7.6 for testing some new features, including syslog
> support for client.
> Its working great and Im getting the following lines when using localhost:
>
> Mar 12 12:36:34 server1 MysqlClient[17854]: SYSTEM_USER:'user1',
> MYSQL_USER:'userdb', CONNECTION_ID:5, DB_SERVER:'--', DB:'mysql',
> QUERY:'use mysql'
> Mar 12 12:36:36 server1 MysqlClient[17854]: SYSTEM_USER:'user1',
> MYSQL_USER:'userdb', CONNECTION_ID:5, DB_SERVER:'--', DB:'mysql',
> QUERY:'show tables;'
> Mar 12 12:36:55 server1 MysqlClient[17856]: SYSTEM_USER:'user1',
> MYSQL_USER:'userdb', CONNECTION_ID:6, DB_SERVER:'--', DB:'mysql',
> QUERY:'use mysql '
>
> However, if I try to access MySQL in any other server, for example "mysql
> -uuser -ppasswd -hserver2", it doesn't log in syslog.
> My client section config is:
>
> [client]
> #password   = [your_password]
> port        = 3306
> socket      = /var/lib/mysql/mysql.sock
> syslog
>
> Have any of you tried this?
>
> Thank you in advance.
>
> Stephan

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql