Archlinux,MariaDB 10.1.25
我有工作的mysql。现在我决定用数据移动目录。
我试图将/ var / lib / mysql移动到/ home / srv / mysql。并创建符号链接到旧路径(/ var / lib / mysql)。但是mysqld给出了错误:
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
systemctl status mariadb.service:
● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2017-08-02 20:19:17 +10; 7min ago
Process: 29629 ExecStart=/usr/bin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Process: 29576 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exite
Process: 29575 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Main PID: 29629 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"
访问权限是正确的。用户mysql,组mysql。
告诉我我做错了什么。
答案 0 :(得分:1)
检查您的my.cnf文件,可能有以下选项集:
symbolic-links = 0
我不确定,如果这可以解决问题。
我建议以其他方式解决问题。您只需使用
调整my.cnf中的数据目录,而不是使用符号链接datadir = /home/srv/mysql