A user needs to do :
ALTER DATABASE `dbname` DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
...but even with a :
GRANT ALL PRIVILEGES ON dbname.* TO 'user_name'@'localhost' IDENTIFIED BY '***';
...the user is not allowed to do that.
I found some websites where it is advised to do
GRANT USAGE ON SCHEMA dbname...
...but even in MySQL 8 (sorry we have Mysql 5 on this server) this does not seems to exist :
https://dev.mysql.com/doc/refman/8.0/en/grant.html
Sorry if this question is completely out of score, stupid, or whatsoever, but even with "good" MySQL knowledge I don't understand what I am doing wrong or what I should do.
Thanks a lot in advance for any help !
Denis
This answer is in the documentation. https://dev.mysql.com/doc/refman/8.0/en/alter-database.html says:
The
GRANT USAGEonly allows that user to connect to the server. It doesn't give privileges to do any SQL statement. In fact, it does not make sense toGRANT USAGEon a specific database. If you try, the user ends up with only USAGE privilege at the server level: