Bug #57800 | MySQL prefPane on MacOSX polls the server without being asked to | ||
---|---|---|---|
Submitted: | 28 Oct 2010 10:53 | Modified: | 14 Jan 2013 17:45 |
Reporter: | Giuseppe Maxia | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Installing | Severity: | S3 (Non-critical) |
Version: | 5.1.52, 5.5.29 | OS: | MacOS (10.6.5,10.8.2) |
Assigned to: | Assigned Account | CPU Architecture: | Any |
Tags: | dmg, installer, macosx, polling, Widget |
[28 Oct 2010 10:53]
Giuseppe Maxia
[28 Oct 2010 13:07]
Alfredo Kojima
The connections are opened by mysqladmin ping, to see if the server is still up and update the status accordingly. Does the polling stop when you quit the app?
[28 Oct 2010 13:41]
Giuseppe Maxia
I don't see any mysqladmin in the process list (ps auxw) But when I remove stop the preference panel itself, the polling stops. Now, there are two problems here: 1) the user does not know where the polling comes from. Finding the item responsible for the amount of connections every two seconds is a long exercise. 2) Once found the culprit, the user doesn't know how to stop it or change its behavior. This behavior is the same adopted by the now deprecated instance manager, and I filed a bug about a similar behavior in 2005, for the same reason stated here. Increasing the number of abort_connects for the sake of monitoring the server is damaging for the DBA, who can't tell these fake connections from real failed attempts to connect to the server.
[28 Oct 2010 13:43]
Peter Laursen
Why will it need to poll MySQL? The OS must return info is the service/daemon is running? What did the old MA tray applet for Windows do?
[28 Oct 2010 15:22]
Alfredo Kojima
mysqladmin runs and exits quickly each time, so unless you keep polling ps auxw very quickly, you won't see it. Now, the 2 other ways to check if the server is up that I could think of were: - check ps auxw and see if mysqld is there. That is how it used to work until Tiger. After Tiger, things broke and it was determined that for some reason, preference panes cannot run suid root programs anymore (which is the case of ps) - use support-files/mysql.server status. This doesn't work in OSX: kojima@Woodstock wb52$ /usr/local/mysql/support-files/mysql.server status /usr/local/mysql/support-files/mysql.server: line 420: pidof: command not found ERROR! MySQL is not running kojima@Woodstock wb52$ mysql -uroot Welcome to the MySQL monitor. Commands end with ; or \g. ...
[28 Oct 2010 15:25]
Peter Laursen
" .. you won't see it" is not true. You will see it in status variables. And status variables are used for monitoring. And that is the problem.
[28 Oct 2010 15:33]
Giuseppe Maxia
Alfredo, there is a third way of checking the status of the server, by monitoring the Process ID recorded in the PID file.
[28 Oct 2010 15:59]
Alfredo Kojima
Peter: I was talking about the mysqladmin process. Giuseppe: Where is the the pid file stored? I think it's in the datadir, and the data dir is only readable to the _mysql user/group. The Preferences app process doesn't run as _mysql, so I would need to get the admin password to check for files in there.
[28 Oct 2010 16:49]
Giuseppe Maxia
Alfredo, Since you need the superuser password to start/stop the server, you could use that to get access to the PID file. But this is beside the point. The behavior that I am complaining about is not wanted, nor tolerated. Either I have an out-option, or a way of configuring it. As it is, it's only confusing. The server is started through mysqld_safe, and that will take care of restarting the server if it terminates abnormally. I don't need an application meddling with my status values for it. So, let's please stick to the core of this bug report. The current behavior is wrong. It is not documented (if it is, please tell me where) and it is contrary to established best practices.
[16 Nov 2010 22:17]
Sveta Smirnova
Thank you for the report. Do you see same problem with version 5.1.52? Which version of Mac OSX do you use?
[17 Nov 2010 7:24]
Giuseppe Maxia
Nothing has changed in 5.1.52. My operating system is Mac OSX 10.6.5
[14 Jan 2013 17:45]
Matthew Lord
I verified this using OSX 10.8.2 and the MySQL 5.5.29-community DMG. It looks like we need an improved way of checking the status of MySQL in the pref panel. It seems to do this: mysqladmin -u root ping When you change the default password for root@localhost then it of course fails with "access denied". I don't even see why this ping call is necessary? The status polling within the pref panel is still correct, even when the mysqladmin ping calls are failing. I verified this by starting and stopping MySQL outside of the pref panel. Can we simply remove the unnecessary mysqladmin ping calls? That seems like the best resolution here.