Subject: Re: trouble installing mySQL : mysql_install_db does not create host.frm
From: "Gerrit P. Haase" <[email-masked]>
To: Olivier Delrieu <[email-masked]>
Cc: [email-masked]
Date: Fri, 3 May 2002 14:05:25 +0200

Olivier schrieb:

> Dear all,

> I've installed CAMP and I'm now looking for guidelines to build/install
> mysql under cygwin and XPpro. Sorry for that question but I tried during
> severals days with no luck.

> I'm using the scripts provided by Gerrit P. Haase in
> http://sources.redhat.com/ml/cygwin/2001-12/msg00025.html
> with mysql-3.23.49.tar.gz

> At the end of the installation process, I get the following error when
> starting mysql deamon :

>   /src/mysql/mysql-3.23.49> Starting mysqld daemon with databases from
> /var/mysql/data
>   020503  7:15:49  /usr/libexec/mysqld: Can't find file: './mysql/host.frm'
> (errno: 0)
>   020503 07:15:49  mysqld ended

> This error has been already discussed in several mailing lists, the solution
> was to chown /var/mysql/data with user mysql, but it does not work here.

> I used the following procedure :

> - add user mysql and group cyg_mysql in XP (I log with username
> 'Administrateur')
> - add user and group to cygwin files with
>  mkpasswd -l > /etc/passwd
>  mkgroup -l > /etc/group
> - installation in /scr/mysql
> - mysql.build prep => ok
> - patch -p0 < ../mysql.patch => ok
> - mysql.build conf => ok
> - mysql.build build
>     stops with errors in make info :
>         make[1]: Leaving directory `/src/mysql/mysql-3.23.49/bdb'
>         make: *** [info-recursive] Error 1
> - mysql.build install => ok
> - mysql.build initdb => ok, but
>    ./scripts/mysql_install_db says :
>         Preparing db table
>         Preparing host table
>         Preparing user table
>         Preparing func table
>         Preparing tables_priv table
>         Preparing columns_priv table
>         Installing all prepared tables
>         ERROR: 1033  Incorrect information in file: './mysql/db.frm'
>         ...
>         020503  8:16:00  /usr/libexec/mysqld: Shutdown Complete

> - mysql.build startdb
>     => stops with 'mysqld ended' :
>     cat /var/mysql/data/EXBRAYAT.err
>           /src/mysql/mysql-3.23.49> Starting mysqld daemon with databases from
> /var/mysql/data
>           020503  7:15:49  /usr/libexec/mysqld: Can't find file: './mysql/host.frm'
> (errno: 0)
>           020503 07:15:49  mysqld ended

> Of course, there is no file in /var/mysql/data/mysql/ ...

> when I cp /dev/null to mysql/host.frm the deamon can access the file and the
> error become :
>         020503  8:28:58  /usr/libexec/mysqld: Incorrect information in file:
> './mysql/host.frm'
>         020503 08:28:58  mysqld ended

> So, the installation process did not create the mysql database. but why ? Is
> there a patch to apply in ./scripts/mysql_install_db ?

> Fortunately, I have also installed mysql under XP, and when I copy the
> XP/mySQL databases to the CygWin/mySQL ones, everything (camp & mysqld) is
> working perfectly, except it is a mess with usernames ...

> Mr Haase, could you help ? :-)

Hmmm, I tried with version=3.23.44 and building was fine (with this
little patch, maybe is no longer needed?).

The script does nothing special, it just calls ./configure with
some options which I figured out were possible to use on Cygwin.
Then it calls make and some other targets, so nothing special.
(I hacked it together because I was too lazy to type it in all the time,
I tried to finish the build about 20 times until it was ok for me).

Well, if it doesn't work now I cannot tell why, haven't tried to build
it in the last months.  Maybe you can ask the MySql developers/users at
their own list.

There were some problems with sockets in version=3.23.44, and the server
was not running stable, but it runs.

I used the script for all the action including initdb, startdb and the
bench tests (require perl & modules installed):

  initdb*) ( cd ${src} ;
    make install 2>&1 | tee log.realinstall ;
    mkdir -p ${localstatedir} ;
    make init-db 2>&1 | tee log.init-db )
  ;;
  startdb*) ( cd ${prefix} ; 
    ${prefix}/bin/safe_mysqld & )
  ;;
  bench*) ( cd ${prefix} ;
    cd sql-bench ;
    ./run-all-tests )
  ;;

Gerrit
-- 
=^..^=

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/