Skip to content

[12.x] Add option to disable MySQL ssl when restoring or squashing migrations #55683

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 9, 2025

Conversation

andersonls
Copy link
Contributor

Newer versions of the MySQL client are enforcing a more strict SSL certificate check and resulting in the following error when squashing migrations or running migrate:fresh

ERROR 2026 (HY000): TLS/SSL error: self-signed certificate in certificate chain

Currently, to bypass this error we need to edit the MySQL config file. To make things easier, this PR adds a new option to disable SSL when executing the commands to dump/restore MySQL database.

@taylorotwell taylorotwell merged commit e0b397b into laravel:12.x May 9, 2025
57 of 58 checks passed
@Jellyfrog
Copy link
Contributor

I don't think this is correct at all @andersonls, --ssl is both deprecated and removed in newer Mysql releases, and not a mysql argument, it's for mysqld. ssl-mode seems to be the argument you're looking for https://dev.mysql.com/doc/refman/8.0/en/connection-options.html#option_general_ssl-mode

$ mysql -V
mysql  Ver 14.14 Distrib 8.0.0-dmr, for Linux (x86_64) using  EditLine wrapper
$ mysql --ssl=off
mysql: [ERROR] unknown variable 'ssl=off'

@Jellyfrog Jellyfrog mentioned this pull request May 19, 2025
3 tasks
@andersonls
Copy link
Contributor Author

@Jellyfrog please check #55758, there is a WIP fixing this. My system was aliasing the mysql exec to mariadb and mariadb still uses the --ssl=off option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants