Skip to content
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

The mysql_native_password plugin is deprecated in MySQL 8.4 LTS and dropped in MySQL 9 #6111

Open
bradfordbulger-nasa opened this issue Sep 13, 2024 · 2 comments

Comments

@bradfordbulger-nasa
Copy link

Working with drush 12.5 setting up test copies of Drupal 10, I found that when I created a new database with drush sql:create, when I tried to access it I was getting errors about a missing plugin for mysql_native_password. Looking into it, I saw that I had upgraded mysql on my host machine (a Mac, mysql from homebrew) without thinking much about it, and it was the MySQL 9 client that was failing.

In Drush\Sql\SqlMysql::createdbSql() it is explicitly using the mysql_native_password plugin in a create user command:
$sql[] = sprintf("CREATE USER %s IDENTIFIED WITH mysql_native_password;", $user);

It looks like this was introduced for #4259 although I am not clear on why.

MySQL deprecated the mysql_native_password plugin in 8.4 LTS, and dropped it in 9. I believe that MariaDB still supports this plugin, though they do not recommend it. For what that's worth.

I'd think that there needs to be some path available to users that does not use an obsolete plugin. But it was added in for a reason, and I don't know how that looks now.

@weitzman
Copy link
Member

Some discussion at https://drupal.slack.com/archives/C62H9CWQM/p1726163171134629. Help wanted.

@weitzman
Copy link
Member

Seems like nobody knows why the native plugin is specified. Feel free to submit a pr without it.

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

No branches or pull requests

2 participants