List:Internals« Previous MessageNext Message »
From:Rich Prohaska Date:November 13 2012 8:43pm
Subject:Re: wondering about mysql_install_db in mysql-5.6.8-rc
View as plain text  
the mysql_install_db perl script does not chown the data directory
correctly in 5.6.8-rc.

as root, when i run "scripts/mysql_install_db --user=mysql",  i see

121113 15:40:02  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
121113 15:40:02  InnoDB: File name ./ibdata1
121113 15:40:02  InnoDB: File operation call: 'create' returned OS error 113.
121113 15:40:02  InnoDB: Cannot continue operation.

the perl script does not chown the data directory successfully to the
user mysql.

this line in the script is wrong:

  chown($opt->{user}, $dir) if -w "/" and !$opt->{user};

since chown expects a number not a name for the user id, and i am not
sure that conditional is correct.



On Tue, Nov 13, 2012 at 4:34 AM, Joerg Bruehe <joerg.bruehe@stripped> wrote:
> Hi everybody!
>
>
> Sorry, some mail changes broke my subscription to this list.  :(
> A colleague forwarded the question to me, but my reply will have lost
> the thread - I hope you can still relate it.
>
> Rich Prohaska <prohaska@stripped> wrote:
>> Hello,
>> I noticed that mysql_install_db is a perl script in mysql-5.6.8-rc on
>> linux.  In 5.6.7-rc, it was a shell script.  Both the shell and perl
>> variants of this script are included in the source.  Why was this
>> change made?
>
> Of "mysql_install_db", there is both a shell and a Perl variant since
> long. Until 5.6.7-rc, the shell variant was included on Unix binary
> packages, and the Perl variant in Windows ones.
>
> However, the Perl variant was barely used, because there is the separate
> installer on Windows. So it went undetected that the Perl variant lacked
> some changes which were applied to the shell variant, two scripts that
> were meant to do the same effectively diverged.
>
> Clearly, this needed to be corrected - and the Perl variant should not
> be dropped, for those Windows users that could not use the separate
> installer.
> Also, more functionality was needed in "mysql_install_db", which could
> be implemented in Perl better than in shell.
>
> Because of this, it was decided to add the missing changes to the Perl
> variant and to implement the new functions ("--random-passwords") in the
> Perl variant only.
>
> Currently, the shell variant has not yet been removed, in case some
> subtle problem would still show up in the Perl variant.
> However, I expect this cleanup will soon follow, and the shell variant
> will be removed for clarity's sake (and to protect against fixing the
> wrong one).
>
>
> Do you ask out of curiosity, or are there any usage differences for you?
>
>
> Regards,
> Jörg Brühe
>
> --
> Joerg Bruehe,  MySQL Build Team,  joerg.bruehe@stripped
>                (+49 30) 417 01 487
> ORACLE Deutschland B.V. & Co. KG,   Komturstrasse 18a,   D-12099 Berlin
> Geschaeftsfuehrer: Juergen Kunz     Amtsgericht Muenchen: HRA 95603
> Komplementaerin: ORACLE Deutschland Verwaltung B.V. Utrecht, Niederlande
> Geschaeftsfuehrer: Alexander van der Ven, Astrid Kepper, Val Maher
>
>
> --
> MySQL Internals Mailing List
> For list archives: http://lists.mysql.com/internals
> To unsubscribe:    http://lists.mysql.com/internals
>
Thread
wondering about mysql_install_db in mysql-5.6.8-rcRich Prohaska9 Nov
Re: wondering about mysql_install_db in mysql-5.6.8-rcJoerg Bruehe13 Nov
  • Re: wondering about mysql_install_db in mysql-5.6.8-rcRich Prohaska13 Nov
    • Re: wondering about mysql_install_db in mysql-5.6.8-rcBjorn Munch13 Nov
      • Re: wondering about mysql_install_db in mysql-5.6.8-rcRich Prohaska13 Nov