我试图从刚刚在全新 Ubuntu 24.04.1 系统上安装的 XAMPP (8.2.12) 打开 MySQL 数据库。当 Apache Web 服务器和 ProFTPD 正在运行时,MySQL 拒绝启动:
这是完整的错误日志:
2024-09-29 22:01:48 401639 mysqld_safe Starting mysqld daemon with databases from /opt/lampp/var/mysql
2024-09-29 22:01:48 0 [Note] Starting MariaDB 10.4.32-MariaDB source revision c4143f909528e3fab0677a28631d10389354c491 as proces2024-09-29 22:01:48 0 [Note] Using unique option prefix 'key_buffer' is error-prone and can break in the future. Please use the full name 'key_buffer_size' instead.
s 401794
2024-09-29 22:01:48 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2024-09-29 22:01:48 0 [Note] InnoDB: Uses event mutexes
2024-09-29 22:01:48 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2024-09-29 22:01:48 0 [Note] InnoDB: Number of pools: 1
2024-09-29 22:01:48 0 [Note] InnoDB: Using SSE2 crc32 instructions
2024-09-29 22:01:48 0 [ERROR] mysqld: Can't create/write to file '/tmp/user/0/ib6ZuSDa' (Errcode: 13 "Permission denied")
2024-09-29 22:01:48 0 [ERROR] InnoDB: Unable to create temporary file; errno: 13
2024-09-29 22:01:48 0 [ERROR] mysqld: Can't create/write to file '/tmp/user/0/ibXs4LuJ' (Errcode: 13 "Permission denied")
2024-09-29 22:01:48 0 [ERROR] InnoDB: Unable to create temporary file; errno: 13
2024-09-29 22:01:48 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2024-09-29 22:01:48 0 [Note] InnoDB: Starting shutdown...
2024-09-29 22:01:48 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2024-09-29 22:01:48 0 [Note] Plugin 'FEEDBACK' is disabled.
2024-09-29 22:01:48 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2024-09-29 22:01:48 0 [ERROR] Aborting
2024-09-29 22:01:48 401639 mysqld_safe mysqld from pid file /opt/lampp/var/mysql/immanuel.pid ended
2024-09-29 22:06:09 405682 mysqld_safe Starting mysqld daemon with databases from /opt/lampp/var/mysql
2024-09-29 22:06:09 0 [Note] Starting MariaDB 10.4.32-MariaDB source revision c4143f909528e3fab0677a28631d10389354c491 as process 405833
2024-09-29 22:06:09 0 [Note] Using unique option prefix 'key_buffer' is error-prone and can break in the future. Please use the full name 'key_buffer_size' instead.
2024-09-29 22:06:09 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2024-09-29 22:06:09 0 [Note] InnoDB: Uses event mutexes
2024-09-29 22:06:09 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2024-09-29 22:06:09 0 [Note] InnoDB: Number of pools: 1
2024-09-29 22:06:09 0 [Note] InnoDB: Using SSE2 crc32 instructions
2024-09-29 22:06:09 0 [ERROR] mysqld: Can't create/write to file '/tmp/user/0/ibyJHfgh' (Errcode: 13 "Permission denied")
2024-09-29 22:06:09 0 [ERROR] InnoDB: Unable to create temporary file; errno: 13
2024-09-29 22:06:09 0 [ERROR] mysqld: Can't create/write to file '/tmp/user/0/ibXryd3L' (Errcode: 13 "Permission denied")
2024-09-29 22:06:09 0 [ERROR] InnoDB: Unable to create temporary file; errno: 13
2024-09-29 22:06:09 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2024-09-29 22:06:09 0 [Note] InnoDB: Starting shutdown...
2024-09-29 22:06:10 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2024-09-29 22:06:10 0 [Note] Plugin 'FEEDBACK' is disabled.
2024-09-29 22:06:10 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2024-09-29 22:06:10 0 [ERROR] Aborting
2024-09-29 22:06:10 405682 mysqld_safe mysqld from pid file /opt/lampp/var/mysql/immanuel.pid ended
我尝试过许多像这样的解决方案,但似乎都没有效果。
我认为相关错误如下:
通过搜索发现无法创建/写入文件“/tmp/#sql_xxxx.MYI”(错误代码:13),这说明权限
/tmp
可能错误。Roy说:
建议尝试以上方法。