“基于Alpine的mysql Docker镜像”的版本间的差异

来自linux中国网wiki
跳到导航 跳到搜索
第30行: 第30行:
  
  
 +
[https://segmentfault.com/q/1010000003840346 Docker:无法连接容器中的mysql]
  
  
 +
[https://serverfault.com/questions/616696/lost-connection-to-mysql-server-at-reading-initial-communication-packet-syste Lost connection to MySQL server at 'reading initial communication packet', system error: 0 ]
  
[[category:devops]]  [[category:Container]]
+
[[category:devops]]  [[category:Container]]
 
 
 
 
[https://serverfault.com/questions/616696/lost-connection-to-mysql-server-at-reading-initial-communication-packet-syste Lost connection to MySQL server at 'reading initial communication packet', system error: 0 ]
 

2021年8月18日 (三) 10:37的版本

==


see also

trouble shooting

 van@myxps:~$ mysql -uroot -p -h127.0.0.1 
Enter password: 
ERROR 2013 (HY000): Lost connection to MySQL server at 'handshake: reading initial communication packet', system error: 11


解决办法 注释掉这行  skip-networking      跳过TCP/IP连接
cat /etc/my.cnf.d/mariadb-server.cnf

[mysqld]
#skip-networking


处理过程  其实一开始telent 3306不通就差不多是网络问题啦 , 因为容器里面是可用的 

别人的解决办法 我也记录一下 虽然和我的不同 

1、将 /etc/my.cnf 中的bind-address参数修改成0.0.0.0,表示允许任何ip主机访问此数据库
and 
skip-name-resolve


Docker:无法连接容器中的mysql


Lost connection to MySQL server at 'reading initial communication packet', system error: 0