我在 EC2 上运行,并希望在另一个 EBS 上拥有 MYSQL 的数据目录。我将 EBS (ext3) 安装在 /data 上,并将 my.cnf 中的 datadir 更改为指向该目录。但是,当我尝试启动 mysql 时,出现此错误:
120518 03:53:17 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
120518 03:53:28 mysqld_safe Starting mysqld daemon with databases from /data/mysql/
120518 3:53:28 [Warning] Can't create test file /data/mysql/ip-10-136-23-225.lower-test
120518 3:53:28 [Warning] Can't create test file /data/mysql/ip-10-136-23-225.lower-test
/usr/libexec/mysqld: Can't change dir to '/data/mysql/' (Errcode: 13)
120518 3:53:28 [ERROR] Aborting
120518 3:53:28 [Note] /usr/libexec/mysqld: Shutdown complete
120518 03:53:28 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
有任何想法吗?