From time to time there are failed login attempts in our MySQL production server (MySQL dashboard alerts us). Is there a way to log every single success and failed login to the MySQL server without enabling general_log
?
We think general_log
is not an option due it's a production server with high load.
Best Answer
just to inform the curious one: dig in your error log and presto!
(1). edit my.cnf (Settings documentation found here)
(2). at command run
(3). and you have it!
(4). if you need to restrict the user (dos attack or mysql user password recovering attempt in a multi user database), then (http://dev.mysql.com/doc/refman/5.5/en/user-resources.html)
to restrict to only 100 password recovering attempts per hour.