I understand how to create a new user with privileges, but what is the correct way to change privileges for users that are already created?
We are running a DB audit and some of the users have way more access then is needed. Plus I don't know the passwords for most of these MySQL users, so I don't want to delete them and create new ones.
To list users:
To show privileges:
To change privileges, first revoke. Such as:
Then grant the appropriate privileges as desired:
Finally, flush:
The MySQL documentation is excellent:
https://dev.mysql.com/doc/refman/8.0/en/access-control.html
without downtime you can do this (example for granting ALTER command):
for any other privilege, see current user privileges and right columns to change: