mysqld: Can‘t create/write to file ‘/var/lib/mysql/is_writable‘ (Errcode: 13 - Permission denied)
root@ubuntu:haoke# docker logs perconaInitializing databasemysqld: Can't create/write to file '/var/lib/mysql/is_writable' (Errcode: 13 - Permission denied)2021-01-12T11:54:53.387051Z 0 [Warning] TIME
root@ubuntu:haoke# docker logs percona
Initializing database
mysqld: Can't create/write to file '/var/lib/mysql/is_writable' (Errcode: 13 - Permission denied)
2021-01-12T11:54:53.387051Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2021-01-12T11:54:53.389339Z 0 [ERROR] --initialize specified but the data directory exists and is not writable. Aborting.
2021-01-12T11:54:53.389373Z 0 [ERROR] Aborting
不能一直搜索mysqld: Can't create/write to file '/var/lib/mysql/is_writable' (Errcode: 13 - Permission denied),一直搜索这个问题,我一直没有解决这个问题,因为该搜索Docker安装Percona的步骤的问题,从另一问题去搜索就会得到答案。其实就是设置权限的问题。
#创建容器
docker create --name percona -v /data/mysql-data:/var/lib/mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root percona:5.7.23
就是在cd /data 中添加权限 ;chomd -R 777 data/mysql-data/
更多推荐
所有评论(0)