Hello.
I was only testing MySQL 5.0.16 in chroot environment, so my configuration isn't perfect and should be improved, but mysqld runs in it: [EMAIL PROTECTED] mysqls]# /home/gleb/mysqls/chroot/mysqls/bin/mysqld --defaults-file=/home/gleb/mysqls/chroot/mysqls/my.cnf [EMAIL PROTECTED] mysqls]$ ls chroot/ bin etc home lib mysqls tmp usr var [EMAIL PROTECTED] mysqls]$ ls chroot/bin/ bash ls sh [EMAIL PROTECTED] mysqls]$ ls chroot/etc/ chroot/home/ chroot/tmp/ chroot/usr/ chroot/var/ chroot/etc/: group passwd chroot/home/: gleb chroot/tmp/: chroot/usr/: lib local chroot/var/: [EMAIL PROTECTED] mysqls]$ ls chroot/home/gleb/ chroot/usr/lib/ chroot/usr/local/ chroot/home/gleb/: chroot/usr/lib/: libnss_compat.so libnss_files.so libnss_nisplus.so libnss_dns.so libnss_hesiod.so libnss_nis.so chroot/usr/local/: mysql [EMAIL PROTECTED] mysqls]$ ls chroot/lib/ ld-linux.so.2 libnss_dns.so.2 libnss_nis.so.2 libc.so.6 libnss_files-2.3.5.so libnss_tcb.so.2 libdl.so.2 libnss_files.so libnss_winbind.so libhistory.so.4 libnss_files.so.2 libnss_winbind.so.2 libhistory.so.4.3 libnss_hesiod-2.3.5.so libnss_wins.so libnsl-2.3.5.so libnss_hesiod.so libnss_wins.so.2 libnsl.so.1 libnss_hesiod.so.2 libpthread.so.0 libnss_compat-2.3.5.so libnss_nis-2.3.5.so libreadline.so.4 libnss_compat.so libnss_nisplus-2.3.5.so libreadline.so.4.3 libnss_compat.so.2 libnss_nisplus.so librt.so.1 libnss_dns-2.3.5.so libnss_nisplus.so.2 libtinfo.so.5 libnss_dns.so libnss_nis.so In mysqls directory I have unpacked mysql-debug-5.0.16-linux-i686-glibc23 distribution. My configuration file: [client] #password = your_password port = 3752 socket = /mysqls/tmp/mysql.sock.gleb.i default_character_set=utf8 # Here follows entries for some specific programs character-sets-dir= /mysqls/share/mysql/charsets # The MySQL server [mysqld] character-sets-dir= /mysqls/share/mysql/charsets #init_connect='set @lchar=1;' #ft_stopword_file=/mysqls/ftopfile.txt #default_character_set=utf8 #default-collation=cp1251_bin chroot=/home/gleb/mysqls/chroot default_time_zone='+10:00' log_slow_queries=/mysqls/logs/mysql.log-slow.i long_query_time=1 max_connections=100 #myisam_data_pointer_size=8 #old_passwords #log_warnings=2 set-variable=user=gleb #lower_case_table_names=1 default_character_set=latin2 port = 3752 socket = /mysqls/tmp/mysql.sock.gleb.i skip-locking pid-file = /mysqls/tmp/mysql.pid.gleb.i log = /mysqls/logs/mysql.log.i #log = OFF log-bin = /mysqls/logs/log_i/log_i log-error = /mysqls/logs/mysql.log-error.i datadir =/mysqls/data #key_buffer = 100M #max_allowed_packet = 50M table_cache = 4 #sort_buffer_size = 64M #myisam_sort_buffer_size = 64M #read_buffer_size = 10M #read_rnd_buffer_size = 10M net_buffer_length = 2K thread_stack = 64K wait_timeout=1000 net_read_timeout = 5555 slave_net_timeout = 2555 query_cache_size = 5MB interactive_timeout=50 # Don't listen on a TCP/IP port at all. This can be a security enhancement, # if all processes that need to connect to mysqld run on the same host. # All interaction with mysqld must be made via Unix sockets or named pipes. # Note that using this option without enabling named pipes on Windows # (using the "enable-named-pipe" option) will render mysqld useless! # #skip-networking #skip-innodb server-id = 1 #replicate-rewrite-db=test->test2; # Uncomment the following if you want to log updates #log-bin # Uncomment the following if you are NOT using BDB tables #skip-bdb innodb_file_per_table innodb_data_home_dir=/mysqls/data innodb_data_file_path = ibdata1:10M;ibdata2:50M; #innodb_log_group_home_dir = /usr/local/mysql/data/ innodb_log_group_home_dir =/mysqls/data #innodb_log_arch_dir = /usr/local/mysql/data/ innodb_log_arch_dir =/mysqls/data # You can set .._buffer_pool_size up to 50 - 80 % # of RAM but beware of setting memory usage too high innodb_buffer_pool_size = 16M innodb_additional_mem_pool_size = 2M # Set .._log_file_size to 25 % of buffer pool size innodb_log_file_size = 5M innodb_log_buffer_size = 8M innodb_flush_log_at_trx_commit = 1 innodb_lock_wait_timeout = 50 # Uncomment the following if you are using InnoDB tables #innodb_data_home_dir = /usr/local/mysql/data/ #innodb_data_file_path = ibdata1:10M:autoextend #innodb_log_group_home_dir = /usr/local/mysql/data/ #innodb_log_arch_dir = /usr/local/mysql/data/ # You can set .._buffer_pool_size up to 50 - 80 % # of RAM but beware of setting memory usage too high #innodb_buffer_pool_size = 16M #innodb_additional_mem_pool_size = 2M # Set .._log_file_size to 25 % of buffer pool size #innodb_log_file_size = 5M #innodb_log_buffer_size = 8M #innodb_flush_log_at_trx_commit = 1 #innodb_lock_wait_timeout = 50 [mysqld_safe] chroot=/home/gleb/mysqls/chroot [mysqldump] quick max_allowed_packet = 16M #default_character_set = latin1 [mysql] no-auto-rehash # Remove the next comment character if you are not familiar with SQL #safe-updates #default_character_set=latin1 ##default_character_set=latin1 #default-character-set=utf8 max_allowed_packet=50M [isamchk] key_buffer = 8M sort_buffer_size = 8M [myisamchk] key_buffer = 8M sort_buffer_size = 8M character-sets-dir=/mysqls/share/mysql/charsets [mysqlhotcopy] interactive-timeout Andrew Rucker Jones wrote: > Hi all! > I had chroot working under 3.23 and 4.x, although it was always rather > kludgy. Under 5.0 i can't get it to work to save my life. I start MySQL > with the mysql.server script that is included in 5.0. It seems that no > matter how i set options like basedir=, datadir=, pidfile=, and so > forth, it doesn't work. It seems like the only way to possibly make it > work would be to symlink myself to death and/or copy half of the > installation to the chroot()ed directory, since mysql.server and > mysqld_safe use the same parameters as mysqld from /etc/my.cnf, but they > use them before a chroot() call, whereas mysqld uses them after a > chroot() call. Setting the options separately in [mysql.server] and/or > [mysqld_safe] doesn't change anything. > Does anyone have any pointers? Has anyone gotten it to work? > > -& > > -- > GPG key / Schlüssel -- http://simultan.dyndns.org/~arjones/gpgkey.txt > Encrypt everything. / Alles verschlüsseln. > -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]