0

I'm trying to run mysqld inside chroot environment. Herez the situation.

When I run mysqld as root, I can connect to my databases. But when I run mysql using init.d scripts, mysql gives me an error.

$ mysql --user=root --password=password
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)

So I guess, I need to change file permissions of some files. But which ones? Oh and in case you are wondering '/var/run/mysqld/mysqld.sock' is owned by 'mysql' user.

EDIT: strace output looks something like this

[pid 20603] futex(0xf2cfc4, FUTEX_WAIT_PRIVATE, 685, NULL <unfinished ...>
[pid 20601] rt_sgtimedwait[HUP QUIT ALRM TERM TSTP], NULL, NULL, 8 <unfinished ...>
[pid 20600] futex(0xf2cfc4, FUTEX_WAIT_PRIVATE, 1, NULL <unfinished ...>
[pid 20599] select(0, NULL, NULL, NULL, {0, 278651} <unfinished ...>
[pid 20598] select(0, NULL, NULL, NULL, {0, 42192} <unfinished ...>
[pid 20596] futex(0x21a72708, FUTEX_WAIT_PRIVATE, 1, NULL <unfinished ...>
[pid 20595] futex(0x21a72690, FUTEX_WAIT_PRIVATE, 7, NULL <unfinished ...>
[pid 20594] futex(0x21a72618, FUTEX_WAIT_PRIVATE, 5, NULL <unfinished ...>
[pid 20593] futex(0x21a725a0, FUTEX_WAIT_PRIVATE, 1, NULL <unfinished ...>
[pid 20587] select(12, [10 12], NULL, NULL, NULL <unfinished ...>
[pid 20599] <... select resumed> )        = 0 (Timeout)
[pid 20599] time (NULL)                   = 12982215237
[pid 20599] select(0, NULL, NULL, NULL, {1, 0} <unfinished ...>
...........repeats.

1 Answer 1

0

It is a bug with schroot. mysqld escapes chroot and interacts with systems's mysqld.

http://ubuntuforums.org/showthread.php?t=1625863 https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/430224

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .