Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Interpreting mysql query log

Tags:

mysql

With the following:

select * from mysql.general_log order by event_time desc

Why does it show "Access denied" so frequently? It seems like it tries to do that every two seconds or so. Is this a bug or why is this occurring and what does it mean?

| user_host                 | thread_id | server_id | command_type | argument                                                          |
+---------------------------+-----------+-----------+--------------+-------------------------------------------------------------------+
| root[root] @ localhost [] |       122 |         0 | Query        | select * from mysql.general_log order by event_time desc          |
| [] @ localhost []         |       223 |         0 | Connect      | Access denied for user 'dave'@'localhost' (using password: NO) |
| [dave] @ localhost []  |       223 |         0 | Connect      | dave@localhost as  on                                          |
| [] @ localhost []         |       222 |         0 | Connect      | Access denied for user 'dave'@'localhost' (using password: NO) |
| [dave] @ localhost []  |       222 |         0 | Connect      | dave@localhost as  on                                          |
| [] @ localhost []         |       221 |         0 | Connect      | Access denied for user 'dave'@'localhost' (using password: NO) |
| [dave] @ localhost []  |       221 |         0 | Connect      | dave@localhost as  on                                          |
| [] @ localhost []         |       220 |         0 | Connect      | Access denied for user 'dave'@'localhost' (using password: NO) |
| [dave] @ localhost []  |       220 |         0 | Connect      | dave@localhost as  on                                          |
| [] @ localhost []         |       219 |         0 | Connect      | Access denied for user 'dave'@'localhost' (using password: NO) |
| [dave] @ localhost []  |       219 |         0 | Connect      | dave@localhost as  on                                          |
| [] @ localhost []         |       218 |         0 | Connect      | Access denied for user 'dave'@'localhost' (using password: NO) |
| [dave] @ localhost []  |       218 |         0 | Connect      | dave@localhost as  on                                          |
| [] @ localhost []         |       217 |         0 | Connect      | Access denied for user 'dave'@'localhost' (using password: NO) |
| [dave] @ localhost []  |       217 |         0 | Connect      | dave@localhost as  on                                          |
| [] @ localhost []         |       216 |         0 | Connect      | Access denied for user 'dave'@'localhost' (using password: NO) |
| [dave] @ localhost []  |       216 |         0 | Connect      | dave@localhost as  on                                          |
| [] @ localhost []         |       215 |         0 | Connect      | Access denied for user 'dave'@'localhost' (using password: NO) |
like image 952
David542 Avatar asked Jun 19 '26 19:06

David542


1 Answers

As the error message reads, something is attempting to connect to your server as dave, from your local machine without using a password. I assume the dave account either doesn't exist, exists but restricts to an IP or exists with a password.

If it was replication, you wouldn't see 'dave'@'localhost' being denied access, it would be 'dave'@'someotherserver' (unless you have two mysql processes running on the same server).

If it's a regular thing, then I'd look at cron first; see if anything is regularly trying to connect to MySQL.

like image 96
pb585 Avatar answered Jun 21 '26 08:06

pb585



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!