大网数据广告活动
服务器运维问答

Failed to start mysql after moving to new partition

· 52CE 我爱测

I used to use mysql data in /var/lib/mysql, now I have created new partition and created tank on it to use with zfs. After that I follow this steps to move my existing mysql data to new dir: https://serverfault.com/a/539729/18457…

问题原文

原帖链接 · iWizard · CC BY-SA 3.0

I used to use mysql data in /var/lib/mysql, now I have created new partition and created tank on it to use with zfs.

After that I follow this steps to move my existing mysql data to new dir: https://serverfault.com/a/539729/184573

Everything worked ok so I have imported new big db (100 GB) and now is not working anymore.

I'm getting this error

in "/var/log/mysql/error.log"

Detailed explanation:

  1. I'm on /tank/mysql, using zfs and everything is working ok

  2. imported new db, mysql was working ok

  3. stopped mysql service and executed zfs

  4. snapshot tank/mysql@imported now I cannot start mysql because of upper error

  5. tried to chown mysql:mysql /tank/mysql -R , still same error

I have google that problem and none of solutions helped me. Permissions, settings,... everything seems to be ok.

OS: Ubuntu server 14.04.

Server: IBM X3200 m3

What could be a problem?

Thank you

已采纳解答

原帖链接 · ksm · CC BY-SA 3.0

Posting this as an answer.

It was a file permissions issue. U need to ensure that the mysql user has access to the mysql datadir and the directory it is in, all the way to the root level directory.

If multiple users need access to these directories, then put them in a group and then give that group access to those directories.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-07-08)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。