You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MariaDB 11 is out, and has deprecated the mysql (and mysqldump and mysqladmin) commands in favor of mariadb commands. The mysql commands now issue a deprecation message when used, which breaks the provider. e.g.:
Error: Could not prefetch mysql_database provider 'mysql': Execution of '/usr/bin/mysql -NBe show variables like '%_database' /usr/bin/mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead' returned 1: /usr/bin/mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead
ERROR 1102 (42000): Incorrect database name '/usr/bin/mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/ma...'
And if we just run mysql directly on the command line:
# mysql
mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 3927
Server version: 11.0.2-MariaDB Arch Linux
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
Expected Behavior
The provider will work, without throwing errors because of the deprecation message. Ideally, the provider will detect the presence of mariadb (etc.) commands and prefer those over mysql commands (at least if the engine that's running is MariaDB). Or, failing that, the provider won't error out on the deprecation message.
Steps to Reproduce
Install MariaDB 11.0.2 client.
Use any of the features in this module which call out to the mysql binary.
Environment
Version: 15.0.0 (latest)
Platform: Arch Linux, Puppet 7.24.0
The text was updated successfully, but these errors were encountered:
Possible quickfix could imho be in lib/puppet/provider/mysql.rb to adjust mysql_caller. There add a version-compare if mariadb newer than 11.0.0 is used. Then use mariadb_raw instead of mysql_raw (copy those lines). And define a command mariadb_raw of course. Maybe there is a cleaner solution, but for the moment it worked for me.
OxCom
pushed a commit
to OxCom/puppetlabs-mysql
that referenced
this issue
Mar 29, 2024
Describe the Bug
MariaDB 11 is out, and has deprecated the
mysql
(andmysqldump
andmysqladmin
) commands in favor ofmariadb
commands. Themysql
commands now issue a deprecation message when used, which breaks the provider. e.g.:And if we just run
mysql
directly on the command line:Expected Behavior
The provider will work, without throwing errors because of the deprecation message. Ideally, the provider will detect the presence of
mariadb
(etc.) commands and prefer those overmysql
commands (at least if the engine that's running is MariaDB). Or, failing that, the provider won't error out on the deprecation message.Steps to Reproduce
mysql
binary.Environment
The text was updated successfully, but these errors were encountered: