Bug 113820

Summary: "service mysql start" fails when MySQL uses passwords.
Product: [Fedora] Fedora Reporter: Sam Varshavchik <mrsam>
Component: mysqlAssignee: Kim Ho <kho>
Status: CLOSED DUPLICATE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 1   
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: 2006-02-21 19:00:49 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:

Description Sam Varshavchik 2004-01-18 21:27:36 UTC
Description of problem:

The initial MySQL configuration provides for a 'root' MySQL user
without a password.  In security-sensitive environments the usual
first step is to secure MySQL by putting a password on the root user:

mysql -u root mysql
> SET PASSWORD FOR root@localhost=PASSWORD('new_password');

Unfortunately, after the password is set, the initscript will always
report a spurious failure when starting MySQL.  That's because the
initscript depends on a password-less root account in order to ping
the server.

Version-Release number of selected component (if applicable):

Any MySQL release.

How reproducible:

Always

Steps to Reproduce:
1.  Install MySQL
2.  Assign the root password, as per above.
3.  "service mysqld stop"
4.  "service mysqld start"

Actual results:

# service mysqld start
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL:                                            [FAILED]

Additional info:

MySQL actually starts, and is running.  The error is reported because
of this (two occurences in the mysqld initscript):

      if [ -n "`/usr/bin/mysqladmin ping 2> /dev/null`" ]; then

Because the login and password is not supplied, mysqladmin fails. I
have to replace the above with "/usr/bin/mysqladmin --user=root
--password=PASSWORD ping" in order for the initscript to work correctly.

Putting a password on the root MySQL account is a reasonable thing. 
The initscript should either be changed to use a different mechanism
to verify that the server is running, or the initscript should be
configurable, in some way, to use a password to ping the server.

Comment 1 Kim Ho 2004-01-19 14:10:35 UTC
Please perform an up2date.

The service script now uses anonymous users. If you remove anonymous
users or want to use your own setup for pinging the server, you'll
have to change the script.

For additional reference, see bug 108779.

*** This bug has been marked as a duplicate of 108779 ***

Comment 2 Red Hat Bugzilla 2006-02-21 19:00:49 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.