Native authentication user - grant access to a single database
I’m using the DO database cluster with MySQL and want to power some simple databases for example WordPress.
I created a new user and database in the control panel and changed it to native authentication:
ALTER USER myusername IDENTIFIED WITH mysql_native_password BY 'USERPASSWORD';
So far it works very well. But the user has in this case access to almost every database in the cluster so I removed this and add it specific:
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, CREATE VIEW, EVENT, TRIGGER, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EXECUTE ON `mydatabasename`.* TO 'myusername'@'%';
Also if I login with another user in phpMyAdmin I also can see the access of this user but it doesn’t work and this users also doesn’t the the called database in the phpMyAdmin.
Which part I have missed?
Thanks in advance!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×