mysql8.0启动时报错 mysqld: File './binlog.index' not found (OS errno 13 - Permission denied)
修改数据库的路径启动时 Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.
错误,查看log信息发现以下错误:
2018-09-08T04:57:22.077305Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.12) starting as process 16425mysqld: File './binlog.index' not found (OS errno 13 - Permission denied)2018-09-08T04:57:22.079492Z 0 [ERROR] [MY-010119] [Server] Aborting2018-09-08T04:57:22.079662Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.12) MySQL Community Server - GPL.
原因:
是因为在复制数据时,没有修改权限。
解决方法:
chgrp -R mysql /alidata/mysql && chown -R mysql /alidata/mysql