database user can't use database
This is what I'm seeing on MySQL 8.0.20:
mysql> SHOW GRANTS FOR 'auth_user'@'%';
+------------------------------------------------------------+
| Grants for auth_user@% |
+------------------------------------------------------------+
| GRANT USAGE ON *.* TO `auth_user`@`%` |
| GRANT ALL PRIVILEGES ON `DBName`.`auth` TO `auth_user`@`%` |
+------------------------------------------------------------+
mysql> flush privileges;
Query OK, 0 rows affected (0.38 sec)
mysql> \q
$ mysql -h $HOST -u auth_user -p
Enter password:
mysql> USE auth;
ERROR 1044 (42000): Access denied for user 'auth_user'@'%' to database 'auth'
This is deeply confusing to me. I don't even know where to look next. Can somebody tell me I'm not insane?
Subject
Written By
Posted
database user can't use database
April 24, 2021 10:25PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.