问题描述
我刚刚使用 apt-get dist-upgrade 更新了 MariaDB.现在它不会再开始使用service mysql start了.
I've just updated MariaDB using apt-get dist-upgrade. Now it won't start using service mysql start anymore.
但是,我可以以 root 身份运行它或执行以下操作:sudo -u mysql mysqld_safe 然后 MariaDB 启动正常.文件夹/home/mysql 归 mysql 用户和组所有.
I can however, run it as root or do: sudo -u mysql mysqld_safe then MariaDB starts up fine. The folder /home/mysql is owned by the mysql user and group.
我发现这个函数会抛出错误:https://github.com/MariaDB/server/blob/7ff44b1a832b005264994cbdfc52f93f69b9/sql/mysqld.cc#L9865
I've found the error to be thrown in this function: https://github.com/MariaDB/server/blob/7ff44b1a832b005264994cbdfc52f93f69b92cdc/sql/mysqld.cc#L9865
我不知道下一步该做什么.有什么指点吗?
I can't figure out what to do next. Any pointers?
推荐答案
从/home 运行 MariaDB SQL,在文件 /usr/lib/systemd/system/mariadb.service
或 >/lib/systemd/system/mariadb.service
,改一下就好了:
To run MariaDB SQL from /home, in the file /usr/lib/systemd/system/mariadb.service
or /lib/systemd/system/mariadb.service
, just change :
ProtectHome=true
到:
ProtectHome=false
这篇关于MariaDB 更新后无法启动:[警告] 无法创建测试文件/home/mysql/beta.lower-test的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!