【原创】大叔经验分享(96)docker启动MySQL报错

docker启动mysql反复重启,通过

# docker logs $container_id

查看日志如下:

chown: cannot read directory ‘/var/lib/mysql/‘: Permission denied

但是目录权限确认没问题,即使 chmod 777 还是报相同的错误,后来发现是selinux的问题

查看状态

# getenforce

临时禁用

# setenforce 0

永久禁用

# vi /etc/selinux/config

# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disable

禁用之后docker启动mysql正常

原文地址:https://www.cnblogs.com/barneywill/p/12115196.html

时间: 2024-11-05 16:04:16

【原创】大叔经验分享(96)docker启动MySQL报错的相关文章

【原创】大叔经验分享(53)kudu报错unable to find SASL plugin: PLAIN

kudu安装后运行不正常,master中找不到任何tserver,查看tserver日志发现有很多报错: Failed to heartbeat to master:7051: Invalid argument: Failed to ping master at master:7051: Client connection negotiation failed: client connection to master:7051: unable to find SASL plugin: PLAIN

Linux系统下启动MySQL报错:Neither host 'localhost.localdomain' nor 'localhost' could be looked up with

Linux系统下启动MySQL报错:Neither host 'localhost.localdomain' nor 'localhost' could be looked up with 摘要 Linux系统下安装完MySQL,启动MySQL报错:Neither host 'localhost.localdomain' nor 'localhost' could be looked up with... Linux系统下装完MySQL,然后重启动时报错: 解决方法:  查看cat /etc/h

Linux系统下启动MySQL报错:Neither host 'localhost.localdomain' nor 'localhost' could be looked up with

Linux系统下启动MySQL报错:Neither host 'localhost.localdomain' nor 'localhost' could be looked up with 摘要 Linux系统下安装完MySQL,启动MySQL报错:Neither host 'localhost.localdomain' nor 'localhost' could be looked up with... Linux系统下装完MySQL,然后重新启动动时报错: 解决方法:  查看cat /etc

关闭或启动linux防火墙后,docker启动容器报错问题解决方式

关闭或启动linux防火墙后,docker启动容器报错问题解决方式 解决办法:重建docker0网络恢复 1.按照进程名杀死docker进程 pkill docker 2.清空防火墙规则-清空nat表的所有链 iptables -t nat -F 3.查看定义规则的详细信息 iptables -L -n -v 4.关闭docker0接口 ifconfig docker0 down 5.删除docker0接口 brctl delbr docker0 6.重启docker systemctl res

【Problem】xampp in ubuntu下命令行启动mysql报错: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/lampp/var/mysql/mysql.sock' (2)

xampp in ubuntu下命令行启动mysql报错: [email protected]:/opt/lampp$ ./bin/mysql -u root -p Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/lampp/var/mysql/mysql.sock' (2) 启动mysql服务: [email protected]:/opt/lampp$ /

Docker中启动mysql报错: Failed to get D-Bus connection

docker版本: [[email protected] ~]# docker versionClient: Version:         1.10.3 API version:     1.22 Package version: docker-common-1.10.3-46.el7.centos.10.x86_64 Go version:      go1.6.3 Git commit:      d381c64-unsupported Built:           Thu Aug

启动MySQL报错

当在linux系统中启动mysql服务的时候service mysqld start时 报:Another MySQL daemon already running with the same unix socket. 解决办法. 原因多个Mysql进程使用了同一个socket. 两个方法解决: 第一个是立即关机 使用命令 shutdown -h now 关机,关机后在启动,进程就停止了. 第二个直接把mysql.sock文件改名即可.也可以删除,推荐改名. 方法 mv /var/lib/mys

Docker 启动network报错解决方案

发现一个docker容器无法远程连接,使用docker stop 也不行无法停止下来,后来发现所有的docker容器都无法连接于是重启docker看看能不能恢复正常,系统是centos 7 启动命令systemctl start docker一直卡着不动,kill掉docker的进程docker -d再次启动还是无法启动按照网上的方法是删除 rm -fr /var/lib/docker/*  所有的内容 我是docker -d 启动的我想删除docker容器我按ctrl+c应该是停止进程了但是万

docker 启动容器报错

2018-10-24 报错信息: /usr/bin/docker-current: Error response from daemon: driver failed programming external connectivity on endpoint goofy_bose (317173685c23c029fd5f28b88ecf1ad2ac425e0338a22ba2b3eeec7b945519fd): iptables failed: iptables --wait -t nat -