Login / logout audit in MySQL

0

I need to know when users login to the mysql database.

My first attempt was to configure the general_log and log_output = FILE parameters. However these options generate excessive logs and this is a problem for me. In fact I do not need to know which queries were executed; just need to know who, when and where (IP) users logged in and out.

My second attempt was to configure the performance_schema parameter. But it also was not possible because the database is a Cloud SQL and the instance I use does not support this configuration and we can not increase the power of the instance in the google cloud.

Is there another way to get all user login / logout in mysql? Including also failed login attempts.

The database version is MySQL 5.7

    
asked by anonymous 18.01.2018 / 18:52

0 answers