Skip to content

Instantly share code, notes, and snippets.

@yaleksandr89
Last active January 30, 2023 09:40
Show Gist options
  • Save yaleksandr89/ce0884455c1f79bdcc906fde39ade939 to your computer and use it in GitHub Desktop.
Save yaleksandr89/ce0884455c1f79bdcc906fde39ade939 to your computer and use it in GitHub Desktop.
```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