情景:
docker容器: 启动mysql
系统: centos
问题:
[root@377c6ef694e7 src]# systemctl start mysqld
Job for mysqld.service failed because the control process exited with error code.
See "systemctl status mysqld.service" and "journalctl -xe" for details.
[root@377c6ef694e7 src]# journalctl -xe
解决:
[root@377c6ef694e7 src]# chmod -R 777 /var/lib/mysql # 添加权限即可.