日期:2014-05-16  浏览次数:20754 次

mysql /tmp权限问题
120518 17:46:05 mysqld_safe mysqld from pid file /usr/local/mysql/var/centos.pid ended
120518 17:49:35 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
^G/usr/local/mysql/libexec/mysqld: Can't create/write to file '/tmp/ibWYEAMG' (Errcode: 13)
120518 17:49:35 InnoDB: Error: unable to create temporary file; errno: 13
120518 17:49:35 [ERROR] Plugin 'InnoDB' init function returned error.
120518 17:49:35 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
120518 17:49:35 [ERROR] Can't start server : Bind on unix socket: Permission denied
120518 17:49:35 [ERROR] Do you already have another mysqld server running on socket: /tmp/mysql.sock ?
120518 17:49:35 [ERROR] Aborting

当然,chown mysql:mysql /tmp后可以解决 
但/tmp 目录的权限改变会影响其他程序运行 如何解决?

------解决方案--------------------
把你的tmp目录权限给mysql用户开放读写,或者另建一个mysql/tmp,在配置文件中指定tmpdir为新建的目录,建议使用后者
------解决方案--------------------
不行就改 /tmp 为 +777
------解决方案--------------------
chmod 777 /tmp