Forked from yaleksandr89/mysql-create-user-native-password
Created
January 30, 2023 09:40
-
-
Save i-amolo/b310582aa9543727d8a1fd85e0fd5f37 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```sql | |
CREATE USER 'login'@'localhost' IDENTIFIED BY 'pass'; | |
GRANT SELECT,UPDATE,INSERT ON dbname.* TO 'login'@'localhost'; | |
GRANT ALL PRIVILEGES ON dbname.* TO 'login'@'localhost'; | |
FLUSH PRIVILEGES; | |
``` | |
Если: An exception occurred in driver: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client | |
То: ALTER USER 'zabbix_yurchenko'@'localhost' IDENTIFIED WITH mysql_native_password BY 'zabbix_yurchenko'; | |
UPD: | |
https://stackoverflow.com/questions/53066962/an-exception-occurred-in-driver-sqlstatehy000-2054-the-server-requested-aut | |
```sql | |
CREATE USER 'login'@'localhost' IDENTIFIED WITH mysql_native_password BY 'ohdear_secret'; | |
GRANT ALL PRIVILEGES ON ohdear_ci.* TO 'ohdear_ci'@'localhost'; | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment