[Nix-dev] mysql trouble / workaround

Tony White tonywhite100 at googlemail.com
Thu Jun 25 04:00:02 CEST 2009


2009/6/25 Marc Weber <marco-oweber at gmx.de>:
> mirkx has asked about mysql on irc recentely.
> The problem:
>
> mysql_install_db reports:
>
> libgcc_s.so.1 must be installed for pthread_cancel to work (repeated 3 times)
> Neither host 'nixvirt' nor 'localhost' could be looked up with
> /nix/store/../resolveip
>
> running that resolveip manually yields the libgcc_s.so.1 message
>
> export LD_LIBRARY_PATH=${pkgs.gcc}/lib or such fixes it.
>
> Do you just happen to know what caused this change?
>
> Sincerly
> Marc Weber
> _______________________________________________
> nix-dev mailing list
> nix-dev at cs.uu.nl
> https://mail.cs.uu.nl/mailman/listinfo/nix-dev
>

Hi Marc,
I just got a LAMP stack running on NixOs after a day and a half of
trying and LAMP stacks are something I can admit to know how to do. :)

There are numerous problems that prevent a default configuration
running "Out of the box" And the resolveip problem is one of them.
The other solution (Which I used) Was to use the --force option of
mysql_install_db in the mysql upstart job to force the table creation.
Not exactly ideal but it works.

Other problems include :

The apache php module looks for the mysql socket in /tmp/mysql.sock
and mysql needs to be told where to create the socket too (mysql.sock)
but unfortunately command line arguments to mysqld seem to be pretty
fruitless. /etc/my.cnf seems to be the best way to set mysql.sock and
that doesn't get generated by the mysql expression.
So mysql is a bit of a problem on NixOs without a generated
/etc/my.cnf. The php.ini setting for the mysql.sock and the mysql.sock
location configurations in my.cnf need to be the same and
automatically generated somehow to get a default LAMP stack that works
out of the box. Which would prevent much head scratching for others.

I can see lot's that needs to be set in the php expression but it does all work.

Does export LD_LIBRARY_PATH=${pkgs.gcc}/lib fix both messages or just
the pthread_cancel message?

Thanks,
Tony



More information about the nix-dev mailing list