作者:123454ewefewf | 来源:互联网 | 2023-09-17 16:48
AccordingtoMariaDBdocs(https://mariadb.com/kb/en/mariadb/development-pluggable-authe
According to MariaDB docs (https://mariadb.com/kb/en/mariadb/development-pluggable-authentication/), the correct syntax to create an user with mysql_native_password plugin is:
1
| CREATE USER asd IDENTIFIED VIA mysql_native_password USING '***'; |
And today phpMyAdmin 4.5.0.2 is using this syntax:
1
| CREATE USER 'asd'@'%' IDENTIFIED WITH mysql_native_password BY '***'; |
This is generating errors "1065 - Query was empty" error above the printed query and "The selected user was not found in the privilege table." right on top of the user creation wizard.
I was able to create the user directly in SQL Query with the syntax pointed at MariaDB docs. (got password hash using
1
| select PASSWORD('test'); |
).
Versions:
phpMyAdmin 4.5.0.2
MariaDB 10.0.20-MariaDB
该提问来源于开源项目:phpmyadmin/phpmyadmin
Hi,
there is a bug for this. If you create new user through phpmyadmin this is the syntax that is used:
CREATE USER 'test'@'localhost' IDENTIFIED VIA mysql_native_password USING '***';
And it works. But when you login with that username and change password it says changed but it really is not. If you logout and login with new password you will fail. You cannot login with new password but with old one you can. This is shown in the log:
21:37:08 [Warning] 'user' entry 'test' has both a password and an authentication plugin specified. The password will be ignored.
If you delete in mysql.user of the user test field plugin, then new password is working. Any idea?