HiveBrain v1.2.0
Get Started
← Back to all entries
debugsqlMinor

How to stop OSX MySQL filling up error logs

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
errorosxlogsstopfillingmysqlhow

Problem

I've noticed about every second, a new line the mysqld error log noting a login failure. The user isn't always the same, but it consistently happens every second when mysqld is running. I'd like to turn this behavior off or prevent it from logging. I suspect this has something to do with launchd / launchctl.

Suggestions??

e.g.

2016-03-12T16:50:28.126292Z 1567 [Note] Access denied for user '_spotlight'@'localhost' (using password: NO)
2016-03-12T16:50:30.298595Z 1568 [Note] Access denied for user '_spotlight'@'localhost' (using password: NO)
2016-03-12T16:50:32.130295Z 1569 [Note] Access denied for user '_spotlight'@'localhost' (using password: NO)
2016-03-12T16:50:34.131190Z 1570 [Note] Access denied for user '_spotlight'@'localhost' (using password: NO)
2016-03-12T16:50:36.131302Z 1571 [Note] Access denied for user '_spotlight'@'localhost' (using password: NO)
2016-03-12T16:50:39.211193Z 1572 [Note] Access denied for user '_spotlight'@'localhost' (using password: NO)
2016-03-12T16:50:40.322560Z 1573 [Note] Access denied for user '_spotlight'@'localhost' (using password: NO)
2016-03-12T16:50:42.130756Z 1574 [Note] Access denied for user '_spotlight'@'localhost' (using password: NO)
2016-03-12T16:50:44.131086Z 1575 [Note] Access denied for user '_spotlight'@'localhost' (using password: NO)
2016-03-12T16:50:46.130904Z 1576 [Note] Access denied for user '_spotlight'@'localhost' (using password: NO)
2016-03-12T16:50:49.064900Z 1577 [Note] Access denied for user '_spotlight'@'localhost' (using password: NO)
2016-03-12T16:50:52.814885Z 1578 [Note] Access denied for user '_spotlight'@'localhost' (using password: NO)
2016-03-12T16:50:54.130283Z 1579 [Note] Access denied for user '_spotlight'@'localhost' (using password: NO)
2016-03-12T16:50:56.132243Z 1580 [Note] Access denied for user '_spotlight'@'localhost' (using password: NO)


My install info:

```
mysql> SHOW VARIABLES LIKE '%version%';;
+-------------------------+------------------------------+
| Variable_

Solution

[This question is almost a year old, but anyways I just came across it while investigating the same issue, and although the answer is probably no longer relevant for you, it might be for someone else reading this.]

This can happen when using the standard MySQL installation including the MySQL preference pane. When opening the MySQL preference pane, it will periodically (about once per second) try to connect to localhost, presumably to find out if MySQL is running and display the status accordingly. Interestingly, these connections do not stop when going back to the System Preferences start screen, but they do stop when closing the System Preferences.

When initiating these connections, the preference pane uses various usernames (for whatever reason). On my macOS Sierra with MySQL 5.7.17, I observed _spotlight, _mysql and the current user’s username.

However, if you get those log entries even when System Preferences are closed, this is a different issue in your case.

Context

StackExchange Database Administrators Q#132077, answer score: 6

Revisions (0)

No revisions yet.