Skip to content

Conversation

@Pr0gramWizard
Copy link

On Arch Linux, the mysql client binary is provided by MariaDB, since MySQL has been dropped from the official repositories.
As a result, running mysql --version returns a MariaDB version string and a deprecation warning:

mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead
mysql from 12.0.2-MariaDB, client 15.2 for Linux (x86_64) using readline 5.1

which causes the function MySQLClientPath in internal/cmdutil/cmdutil.go to throw an error:

Error: could not parse server version from: mysql from 12.0.2-MariaDB, client 15.2 for Linux (x86_64) using readline 5.1

when it attempts to parse the version output.

This PR introduces a compatibility workaround.
If the version string contains "MariaDB" it just returns the path with mysql_native_password as the auth method, rather than erroring out.
This is a bandaid solution to allow Arch users (and other distros using MariaDB as a drop in replacement) to proceed without breaking functionality.
In the long term, it may make sense to support MariaDB explicitly instead of relying on this fallback.

@Pr0gramWizard Pr0gramWizard requested a review from a team as a code owner October 21, 2025 00:33
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.

1 participant