Bug 142328
Summary: | mysqld init script "ping" timeout test fails | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jeremy Laidman <jlaidman> | ||||||||
Component: | mysql | Assignee: | Tom Lane <tgl> | ||||||||
Status: | CLOSED ERRATA | QA Contact: | David Lawrence <dkl> | ||||||||
Severity: | medium | Docs Contact: | |||||||||
Priority: | medium | ||||||||||
Version: | 3 | CC: | abuse, hhorak, j, marco, noa | ||||||||
Target Milestone: | --- | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | All | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2005-03-21 22:01:43 UTC | Type: | --- | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Attachments: |
|
Description
Jeremy Laidman
2004-12-08 23:09:28 UTC
Created attachment 108158 [details]
Patch to init script that works for me
It seems that I get no STDOUT output for an authentication failure, same as a
failed connection. Instead, we grab the STDERR and grep for the string "Check
that mysql is running".
Hmm ... that's a bit klugy but it's better than no solution at all. Thanks for the suggestion! *** Bug 137438 has been marked as a duplicate of this bug. *** I see what you mean. Rather than look for a failure to connect, and assuming all is OK when not found, better to test for either 1) ping works; or 2) ping response with permission denied. Try this patch instead... Created attachment 108190 [details]
Different patch that's a bit less cludgy
I had the same problem. The cause appeared to be that I had removed the anonymous users (empty user names) from the databases user list. Recreating them back (without any privalliges) resolved the problem. Now my mysqld starts in a few seconds without that error. I'm not sure if it is safe to have these users exist in a production database. I think the solution is to remove the need for having such users in the database. Maybe just check if the daemon runs or check the log file for the word ERROR after the last "start" I just read that this is already discussed in (137438), see comment #3 in this report. I missed that report in my query :-( I have applied a patch for this, based on Jeremy's work, in rawhide (mysql 4.1.7-8) --- I'll work on rolling it into the existing release branches later. Created attachment 109161 [details]
Patch allows non-anonymous ping check by using username from sysconfig
I found this too. This is due to our security policy disallowed anonymous
access to the mysql server.
To stop this error appearing every time I boot, I can just change the init.d
script with a new username:
ping="/usr/bin/mysqladmin -ucorrect_user ping"
This username (and optionally password) should really be set in a sysconfig
variable, not the startup script, just like pand and dhcpd do.
This optional new file /etc/sysconfig/mysqld should be mode 600.
----------------------------------------------------
# Username and password for mysql ping
USERNAME=pinguser
#PASSWORD=secretpassword
---------------------------------------------------
I understand it's a slightly different issue, but similar enough to stay within
this bug. Tell me if I'm wrong, or if there's a better way to fix it.
I have pushed out a fix for FC3 in mysql-3.23.58-14. It will still need to be fixed in RHEL4. This is now fixed in pending releases for all branches. |