-
Notifications
You must be signed in to change notification settings - Fork 105
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
mariadb v10 still needs -V #9
Comments
Can you please provide the version string for MariaDB v10? Then I don't need to setup a complete server for that on my own. I think we need to have an additional variable to check whether we are on a mysql or a maria db server and the check for -ge 56 or -ge 10 or whatever mariadb version provides the encrypted login. I'll check that once I have the version string. |
Certainly, the latest is 10.2.11. But you may also run into problems with other mysql-compliant clones (specifically, I'm not certain about Percona. There are other clients beyond that, but they're pretty rare). You might consider checking to see if --ssl-mode is available as a variable instead of even worrying about version. If you call
mysql will attempt to set the ssl-mode variable in the client before printing the version. If it's not able to (ie, the variable doesn't exist), you will receive the error "unknown variable 'ssl-mode=REQUIRED'" and a false exit code. The -V will ensure that the mysql client doesn't attempt to do anything else. You could then use ssl-mode if it exists, and fall back to --ssl if it doesn't. Note that the -V must occur after the flag you're testing. The command line parser parses until it sees the -V, and then stops. Examples from a docker instance: The real mysql client will act the same way, though at least of 5.6, ssl is still a valid variable. That doesn't change anything if you're using --ssl-mode as a progressive enhancement (the logic above; use ssl-mode if available and ssl if not). I'm just mentioning it so that you're not surprised by the behaviour during testing. |
I was having this issue too, it shouldn't apply that if there is a "MariaDB" output on mysql -V command. |
So you get into this if you set the CONFIG_mysql_dump_encrypted_login to yes, but mariadb does not have an equivalent to the mysql_config_editor, which is needed to configure the credentials: https://mariadb.com/kb/en/library/mysql_config_editor-compatibility/ |
mmh I see, because with --ssl it was working fine I tought that was just a wrong parameter pass to the dump. |
[EDIT: this posted before I was finished testing originally, feel free to delete until I test further to see if problem was elsewhere]
MariaDB v10 still uses the --ssl flag instead of --ssl-mode=REQUIRED, but nodot_ver for it returns a number greater than 56. This causes the wrong flag to be added if CONFIG_mysql_dump_usessl is true.
The text was updated successfully, but these errors were encountered: