public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* trouble installing mySQL : mysql_install_db does not create host.frm
@ 2002-05-03  2:40 Olivier Delrieu
  2002-05-03  5:06 ` Gerrit P. Haase
  0 siblings, 1 reply; 2+ messages in thread
From: Olivier Delrieu @ 2002-05-03  2:40 UTC (permalink / raw)
  To: cygwin

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 ? :-)

thanks,

Olivier.



---------------------------------------------
Olivier Delrieu
delrieu@necker.fr
Phone  : +33 1 44 89 77 59
       : +33 1 44 89 77 50 (secretariat)
Mobile : +33 6 64 63 00 15
---------------------------------------------


--
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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: trouble installing mySQL : mysql_install_db does not create host.frm
  2002-05-03  2:40 trouble installing mySQL : mysql_install_db does not create host.frm Olivier Delrieu
@ 2002-05-03  5:06 ` Gerrit P. Haase
  0 siblings, 0 replies; 2+ messages in thread
From: Gerrit P. Haase @ 2002-05-03  5:06 UTC (permalink / raw)
  To: Olivier Delrieu; +Cc: cygwin

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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-05-03 12:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-03  2:40 trouble installing mySQL : mysql_install_db does not create host.frm Olivier Delrieu
2002-05-03  5:06 ` Gerrit P. Haase

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).