gpt4 book ai didi

mysql - InnoDB : Cannot create ./ib_logfile101

转载 作者:太空狗 更新时间:2023-10-29 12:22:50 25 4
gpt4 key购买 nike

我想更改 mysql 的数据目录,所以我将 ./mysql/复制到一个新目录。
这是我使用的命令:

cp ./mysql /home/data/

但是当我启动 mysql 服务时失败。粘贴日志和错误:

  2018-12-14T08:59:23.456895Z 0 [Note] InnoDB: Completed initialization of buffer pool
2018-12-14T08:59:23.460926Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2018-12-14T08:59:23.473245Z 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2018-12-14T08:59:23.473273Z 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2018-12-14T08:59:23.473289Z 0 [ERROR] InnoDB: Cannot create ./ib_logfile101
2018-12-14T08:59:23.473300Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2018-12-14T08:59:24.073902Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2018-12-14T08:59:24.073942Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2018-12-14T08:59:24.073952Z 0 [ERROR] Failed to initialize builtin plugins.
2018-12-14T08:59:24.073960Z 0 [ERROR] Aborting

最佳答案

它就在您的错误消息中:

2018-12-14T08:59:23.473245Z 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2018-12-14T08:59:23.473273Z 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.

尝试

chown -R mysql:mysql /var/lib/mysql #or whatever your new directory is

关于mysql - InnoDB : Cannot create ./ib_logfile101,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53776594/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com