- 背景
挂载的/路径下空间不足,需要切换存储到/data下去
修改my.cnf文件,设置文件存储地址
innodb_data_home_dir = /data/usr/local/mysql/data/
innodb_log_group_home_dir = /data/usr/local/mysql/data/
Starting mysqld: [FAILED]
查看日志less /var/log/mysqld.log
- 处理
修改对应的目录的所属用户与组(参照之前默认的文件路径[mysql])
- 重新启动
/etc/init.d/mysqld start
The error means mysqld does not have the access rights to the directory.File name /data/usr/local/mysql/data/ibdata1 File operation call: 'create'.
修改目录对应的权限(当前755)