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.