vogelor
4th May 2007, 10:20
i don't have access to the developer forum, so i post it here ;-)
these is a little flaw in the script create_chroot_env.sh i posted some days ago (this script is now in the new version of ispconfig).
the flaw is, that the mysql-socked changes its location on every mysql-update.
IF the socked changes, the socked-link i create inside the create_chroot_env.sh links to a "old" socked and so the connection to the DB over this "wrong" socked is not possible.
i made a workarround by deleting the old link before creating the "new" socked. this means, we have to change the following lines (the red ones are new):
# mysql needs the socket in the chrooted environment
mkdir ${HOMEDIR}/var
mkdir ${HOMEDIR}/var/run
mkdir ${HOMEDIR}/var/run/mysqld
# delete the old one, because it changes sometimes its location
rm ${HOMEDIR}/var/run/mysqld/mysqld.sock
ln /var/run/mysqld/mysqld.sock ${HOMEDIR}/var/run/mysqld/mysqld.sock
these is a little flaw in the script create_chroot_env.sh i posted some days ago (this script is now in the new version of ispconfig).
the flaw is, that the mysql-socked changes its location on every mysql-update.
IF the socked changes, the socked-link i create inside the create_chroot_env.sh links to a "old" socked and so the connection to the DB over this "wrong" socked is not possible.
i made a workarround by deleting the old link before creating the "new" socked. this means, we have to change the following lines (the red ones are new):
# mysql needs the socket in the chrooted environment
mkdir ${HOMEDIR}/var
mkdir ${HOMEDIR}/var/run
mkdir ${HOMEDIR}/var/run/mysqld
# delete the old one, because it changes sometimes its location
rm ${HOMEDIR}/var/run/mysqld/mysqld.sock
ln /var/run/mysqld/mysqld.sock ${HOMEDIR}/var/run/mysqld/mysqld.sock