OpenCSW Bug Tracker


Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004798 [mysql5] packaging minor always 2011-06-30 11:45 2012-03-25 22:03
Reporter AirOnSkin View Status public  
Assigned To maciej
Priority normal Resolution fixed  
Status closed  
Summary 0004798: mysql_secure_installation returns error with current mysql5 package
Description After installing mysql5 and running mysql_secure_installation the script breaks at the second action (removing anonymous user) because the first action (setting the root password) doesn't work. The new root password doesn't get applied (even if the output says so), hence the script has no rights for the second action.

After typing the new root password twice the following appears (full log attached):

Reloading privilege tables..
/opt/csw/mysql5/bin/sparcv9/mysql_secure_installation: !: not found
Additional Information
Tags No tags attached.
Attached Files log file icon mysql5-secure-installation.log [^] (1,518 bytes) 2011-06-30 11:45
log file icon mysql-secure-install-extended.log [^] (10,604 bytes) 2011-07-07 13:17

- Relationships

-  Notes
(0009168)
bwalton (administrator)
2011-06-30 15:10

Moved this ticket to the correct package.
-Ben
(0009169)
AirOnSkin (developer)
2011-07-01 11:58

I'll test it on a fresh install next week. It seems only the password changeing doesn't work.
(0009186)
AirOnSkin (developer)
2011-07-07 13:25
edited on: 2011-07-07 13:27

I've tested the issue on a freshly installed solaris and uploaded the log file (mysql-secure-install-extended.log).

My experience:
* There are 3 scripts on the system, they all behave the same.
* All operations except setting the password work. If you start the script and choose to not change the root pw all other steps complete successfully (see try4).
* When executing the script after a couple of minutes after I tried to change the root password (see try1-try3 in the log file) the script does not accept the default password (which is empty upon mysql installation) anymore. Instead the password I wanted to change the default to is being used (see try5 in the log file). Very strange oO

I hope that helps.

Cheers,
Stefan

(0009247)
maciej (reporter)
2011-08-30 00:31

The suspicion is that there is a hardcoded reference to /bin/sh, which does not support the "if ! foo; then bar; fi" syntax. The mysql sources need to be examined and potentially patched to use e.g. /opt/csw/bin/bash instead.
(0009292)
AirOnSkin (developer)
2011-09-21 14:02

maciej's guess was right. When downloading the mysql-5.0.87 source, there's a file called scripts/mysql_secure_installation.sh which calls /bin/sh.

The function (see here: http://paste.pocoo.org/show/479787/) [^] that changes the root password uses ! at two points. The thing that doesn't actually work is reloading the privileges and since there's not check if that was successful no error is being displayed (instead the script happily shouts "Password updated successfully!")

Either one changes the script to use another shell instead or the code needs to be edited to work with sh.
(0009293)
AirOnSkin (developer)
2011-09-21 14:26
edited on: 2011-09-21 14:28

This issue has already been reported to the MySQL guys. See here: http://bugs.mysql.com/bug.php?id=48086 [^]

Newer versions of MySQL include a script which still calls /bin/sh but abandons the use of the "if ! foo; then bar; fi" syntax.

(0009318)
AirOnSkin (developer)
2011-10-03 13:44

The new packet version 5.0.92 solves this problem. Now the privileges get updatet correctly.
(0009767)
maciej (reporter)
2012-03-25 22:03

Thanks for the feedback.


Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker