编译安装mysql ERROR: 1 Can't create/write to file '/tmp/#sql_86b_0.MYI'

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了编译安装mysql ERROR: 1 Can't create/write to file '/tmp/#sql_86b_0.MYI'相关的知识,希望对你有一定的参考价值。

之前安装一个5.1版本,试了一个5.5版本,
useradd -s /sbin/nologin -M mysql   创建一个mysql用户
mkdir -p /data/mysql 
chmod -R /data/mysql 
cd /usr/local/mysql
scripts/mysql_install_db --user=mysql --datadir=/data/mysql
出现报错:ERROR: 1  Can‘t create/write to file ‘/tmp/#sql_86b_0.MYI‘ (Errcode: 13)
/tmp/录目权限不对,
解决方案:chown mysql:mysql /tmp/
                  chown mysql /tmp/
     或者      chmod g+w /tmp/           chgrp mysql /tmp/   

scripts/mysql_install_db --user=mysql --datadir=/data/mysql  就OK了


以上是关于编译安装mysql ERROR: 1 Can't create/write to file '/tmp/#sql_86b_0.MYI'的主要内容,如果未能解决你的问题,请参考以下文章

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' 。安装后出错

ERROR 2003 (HY000): Can't connect to MySQL server on '' (10060) CentOS7 安装二进制包mysql5.7.1

安装mysql5.1过程中Start service停住了` 出现这样的字can not start the service mysql.error:0 为啥会

error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' '

ERROR 2002 (HY000):mysql 启动常见错误

Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist(