报错版本:mysql-5.7.35
1、报错完整提示信息;
[root@localhost bin]# 2022-11-15T04:04:43.122905Z mysqld_safe Logging to '/var/log/mysql.log'.
2022-11-15T04:04:43.130761Z mysqld_safe Directory '/tmp/mysql' for UNIX socket file don't exists.
2、原因:
tmp目录下没有mysql目录或存在该目录但没有写入的权限
3、解决:
新建目录,并赋权
[root@localhost bin]# mkdir /tmp/mysql
[root@localhost bin]# chmod 777 /tmp/mysql
然后重启mysql
[root@localhost bin]# ./mysqld_safe &
标签:tmp,bin,don,socket,safe,mysqld,mysql,localhost
From: https://www.cnblogs.com/liulangdian/p/16892029.html