Bug #68117 mysql_intall_db does not work in solaris 10 sparse root zones
| Submitted: | 18 Jan 2013 10:48 | Modified: | 1 Mar 2013 17:05 |
|---|---|---|---|
| Reporter: | Detlef Ulherr | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Installing | Severity: | S1 (Critical) |
| Version: | 5.6 | OS: | Solaris (10u9) |
| Assigned to: | CPU Architecture: | Any |
[18 Jan 2013 10:48]
Detlef Ulherr
[18 Jan 2013 11:36]
Hartmut Holzgraefe
Reproducible with basedir being read-only for the user running mysql_install_db, e.g.:
sudo make install # install as root
cd /usr/local/mysql
sudo mkdir data
sudo chmod a+rwx data
scripts/mysql_install_db
Fails at
454: open (CFG, "> $copy_cfg_file") or error("Could not open config file");
as $copy_cfg_file is in basedir ... and giving the script a different --basedir option makes it fail with
FATAL ERROR: Could not find my-default.cnf
Suggested fix: restore old behavior and make creating a my.cnf from my-default.cnf optional, or at least add an option to fall back to the old "don't write a my.cnf" behavior
[18 Jan 2013 11:37]
Hartmut Holzgraefe
The "FATAL ERROR:" without message btw is due to error() taking two arguments ($opt and $text) but being called with just one argument in several places ... separate bug report about that coming soon ...
[21 Jan 2013 11:28]
Erlend Dahl
Verified as described by Hartmut.
[8 Feb 2013 13:17]
Leandro Morgado
Same problem is happening when running mysql_install_db as a non root user. In a RHEL5 installation, it tries to create /usr/my*.cnf files and it can't because /usr is only writaeble by root:
open("/usr/my-new.cnf", O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 EACCES (Permission denied)
brk(0x3bd5000) = 0x3bd5000
write(1, "FATAL ERROR: Could not open conf"..., 40) = 40
close(3) = 0
brk(0x3bd4000) = 0x3bd4000
exit_group(1) = ?
[mysql@localhost ~]$ ls -la /usr/my.cnf
-rw-r--r-- 1 root root 943 Feb 6 10:44 /usr/my.cnf
[19 Feb 2013 17:50]
Sveta Smirnova
See also Bug #68416
[1 Mar 2013 17:05]
Paul DuBois
Noted in 5.6.11, 5.7.1 changelogs. mysql_install_db did not work in Solaris 10 sparse root zones.
[9 May 2014 10:05]
Terje Røsten
See also Bug #71600.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.061 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.