Open akrick opened 4 years ago
使用 docker compose, mysql 并不在同一个容器里。
host=127.0.0.1:13306
需改为 host=mysql:13306
使用 docker compose, mysql 并不在同一个容器里。
host=127.0.0.1:13306
需改为host=mysql:13306
修改了之后好像还是没能连上
Pool error is Create connection error(Dsn(mysql:dbname=test;host=mysql:13306) can not to connected!) file(/var/www/swoft/vendor/swoft/db/src/Connector/MySqlConnector.php) line (43) file=/var/www/swoft/vendor/swoft/connection-pool/src/AbstractPool.php line=250 At /var/www/swoft/vendor/swoft/db/src/DB.php line 81
mysql启动报错:
mysql-srv exited with code 2
:( db启动失败了 肯定连不上啊
其中DB的配置如下: