Commit ce30b9a
committed
Fix MySQL root password setup for auth_socket plugin
On GitHub Actions ubuntu-24.04, the pre-installed MySQL 8.0 uses the
auth_socket plugin for root, which requires the OS user to match the
MySQL user. Since the runner runs as "runner" (not "root"), plain
`mysql -u root` fails with access denied.
Fix by falling back to `sudo mysql -u root` when the non-sudo attempt
fails, which satisfies auth_socket's OS user check.
https://claude.ai/code/session_01CsyRwSkRxBcQoaQFVkMQsJ1 parent 822c758 commit ce30b9a
1 file changed
+9
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
340 | 345 | | |
341 | 346 | | |
342 | 347 | | |
| |||
0 commit comments