File permissions to run mysqld in chroot

Posted by Neo on Server Fault See other posts from Server Fault or by Neo
Published on 2011-02-20T13:00:39Z Indexed on 2011/02/20 15:26 UTC
Read the original article Hit count: 197

Filed under:
|
|
|
|

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 20599] <... select resumed> )        = 0 (Timeout)
[pid 20599] time (NULL)                   = 12982215237
[pid 20599] select(0, NULL, NULL, NULL, {1, 0} <unfinished ...>

© Server Fault or respective owner

Related posts about linux

Related posts about ubuntu