MySQL_Error_Can't create/write to file '/root/tmp/
发现MySql对ln的链接文件解析会有问题,因为链接文件的权限吗?
我修改了tmp目录的位置,用ln创建一个软连接过去,MySql居然不能运行了。
Mysql的官方论坛,解释:http://forums.mysql.com/read.php?11,101316,126000
REMARK :
Don't do this :
1. mkdir /var/lib/mysql/tmp
2. chmod mysql:mysql /var/lib/mysql/tmp
3. Add the following line into the [mysqld] section: tmpdir = /var/lib/mysql/tmp
4. Restart the server
But do :
1. mkdir /tmp/mysql
2. chmod 777 /tmp/mysql
3. chown mysql:mysql /tmp/mysql
4. vi /etc/my.cnf and add in [mysqld section] : tmpdir = /tmp/mysql
5. /etc/init.d/mysql restart or /etc/init.d/mysqld restart to restart mysql-server
修改之后,仍然启动不了。
估计还是MySql对链接文件的访问解析有问题。