laradock SQLSTATE[HY000] [2002] Connection refused
laradock容器中运行了mysql、php, laravel代码连接mysql时却提示[HY000] [2002] Connection refused,客户端却可以正常连接,说明是php容器找不到mysql容器1. 查看运行的容器$ docker-compose pslaradock_mysql_1 就是mysql容器的名称,0.0.0.0:3308->3306 (3308 laradock外部访问端口, 3306 laradock内部访问的端口)laravel项.
原创
2021-08-25 11:50:43 ·
889 阅读 ·
0 评论