mysql错误:Can’t create TCP/IP socket (10106)

在答辩前夜,作者帮助一位同学解决了电脑上MySQL端口被占用导致无法启动的问题,通过运行cmd命令netsh winsock reset成功解决问题。
昨天晚上十一点半,有个女同学打电话说电脑出问题了,说tomcat和mysql打不开了,各种急!因为后天就要答辩了,这些软件打不开,系统也就运行不起来!大半夜的让我怎么办,只好说明天早起帮看看!
早早的起来了,接过同学的电脑!回到宿舍看了一下,mysql果然打不开报了这样的错误“mysql错误:Can’t create TCP/IP socket (10106)”,目测是socket端口被占用的原因,然后在打开tomcat,报的错误中也包含了“socket”,再一次加强了我的猜测!
百度!不,坚决不用百度,我用的Google搜索,对比了好多次,百度太垃圾了!
然后问题解决了!
“原因:可能是某些软件和mysql端口冲突,cmd命令运行:netsh winsock reset”
docker run -d --name mysql_slave \ > --net=mysql-net1 \ > -p 3307:3306 \ > -v /data/mysql_slave/log:/var/log/mysql \ > -v /data/mysql_slave/data:/var/lib/mysql \ > -v /data/mysql_slave/conf:/etc/mysql/conf.d \ > -e MYSQL_ROOT_PASSWORD=slavepassword \ > mysql:5.7 27236ea7a922162f053110c1108d96f7eb3058aef57609464545084ba41a8a92 [root@23121242-c2 ~]# cd cd /data/mysql_slave/conf -bash: cd: 参数太多 [root@23121242-c2 ~]# cd /data/mysql_slave/conf [root@23121242-c2 conf]# ls [root@23121242-c2 conf]# vi my.cnf [root@23121242-c2 conf]# docker restart mysql_slave mysql_slave [root@23121242-c2 conf]# docker exec -it mysql_slave mysql -uroot -pslavepassword mysql: [Warning] Using a password on the command line interface can be insecure. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) [root@23121242-c2 conf]# docker exec -it mysql_slave mysql -uroot -pslavepassword mysql: [Warning] Using a password on the command line interface can be insecure. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) [root@23121242-c2 conf]# [root@23121242-c2 conf]# [root@23121242-c2 conf]# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 27236ea7a922 mysql:5.7 "docker-entrypoint.s…" 2 minutes ago Up 25 seconds 33060/tcp, 0.0.0.0:3307->3306/tcp, [::]:3307->3306/tcp mysql_slave 562746f21263 mysql:5.7 "docker-entrypoint.s…" 35 minutes ago Up 23 minutes 0.0.0.0:3306->3306/tcp, [::]:3306->3306/tcp, 33060/tcp mysql_master 13b167b6cb3d nginx:alpine "/docker-entrypoint.…" 2 months ago Exited (255) 2 months ago 0.0.0.0:80->80/tcp, [::]:80->80/tcp web-deploy-nginx-1
07-04
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值