Commit 6e198bb
fix: use TCP health check and retry loop for MySQL readiness in CI
The previous health check used 'mysqladmin ping -h localhost' which
connects via Unix socket inside the container. This reports healthy
before MySQL's TCP listener is ready, causing 'Lost connection to
MySQL server at reading initial communication packet' when the
Initialize database step attempts a TCP connection.
Changes:
- Health check now uses --protocol=tcp (127.0.0.1) to verify TCP
listener is up, not just the socket
- Initialize database step adds a TCP retry loop (up to 20 attempts,
2s sleep) to handle any remaining race condition between health
check and host-side port availability
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 8609d07 commit 6e198bb
1 file changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
106 | 120 | | |
107 | 121 | | |
108 | 122 | | |
| |||
0 commit comments