6

我的 10.04 ubuntu 机器上有一个 chroot 环境。我试图在这个 chroot 环境中运行 mysql,但我得到了这个错误。

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

基本上我使用 debootstrap 和 schroot 来创建 chroot。然后我在这个 chroot 环境中安装了“ubuntu-minimal”和 mysql-server。如果您对这里感兴趣,这里是我遵循的所有步骤https://help.ubuntu.com/community/DebootstrapChroot。但是 mysql 在 chroot 中不起作用。/var/log/mysql.log 和 /var/log/mysql.err 文件为空且 mysqld 服务器正在运行。任何指针?

4

2 回答 2

4

这是 schroot 的一个错误。mysqld 转义 chroot 并与系统的 mysqld 交互。

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

于 2011-02-23T03:37:47.487 回答
1

确保mysql有写权限。尝试以root身份运行mysql。如果可行,请修复文件权限,以便 mysql 具有写入权限并以普通用户身份重新启动 mysql。.

于 2011-02-20T11:27:59.960 回答