Bug 113820 - "service mysql start" fails when MySQL uses passwords.
Summary: "service mysql start" fails when MySQL uses passwords.
Keywords:
Status: CLOSED DUPLICATE of bug 108779
Alias: None
Product: Fedora
Classification: Fedora
Component: mysql
Version: 1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Kim Ho
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-01-18 21:27 UTC by Sam Varshavchik
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-02-21 19:00:49 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.