Sergei,
Forgive my ignorance, but i've been thinking about this. Isn't it impossible to get it to work with the system calls i listed from strace? To repeat:

chdir("/usr/local/var/mysql/") = 0
chroot("/chroot/mysql") = 0
chdir("/") = 0
open("./mysql/host.frm", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file
or directory)

This says to me that it does not matter what i choose for my datadir. chdir() to the directory that open() is expecting is done before the chroot(). Then comes chroot() and chdir("/"), which puts the program where it is not expecting to be, and forces all database directories to be under the root of the chrooted filesystem. There are no other chdir()s between chdir("/") and open().
I'm sure You must have tested this, so i'm missing something. But Your comment to chroot to datadir/.. doesn't help me personally, because i don't chroot to datadir. I chroot to /chroot/mysql, and my databases are (at the moment) in /chroot/mysql/usr/local/var/mysql (which doesn't work). From my my.cnf file:
basedir = /usr/local
datadir = /usr/local/var/mysql
chroot = /chroot/mysql

The order of the entries in my.cnf doesn't matter, right? Just a thought.
I appreciate any help You (or anyone else) can give me. As always, please direct a reply to me, as i am not subscribed to the list.

-&

P.S. Anyone found out what's with safe_mysqld and the "5: command not found" error that Joshua Kugler mentioned on the 13th of December? I have the same problem, and i don't see any replies in the archives. It has to do with one of the NICENESS variables, but the script looks fine to me...



--
GPG key / Schlüssel -- http://simultan.dyndns.org/~arjones/gpgkey.txt
Encrypt everything. / Alles verschlüsseln.


---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to