I have a database that all MySQL users should be able to access.
I've already tried GRANT ALL PRIVILEGES on nomedobanco.* to '%'@'%' identified by
, but to no avail.
How can I do this?
I have a database that all MySQL users should be able to access.
I've already tried GRANT ALL PRIVILEGES on nomedobanco.* to '%'@'%' identified by
, but to no avail.
How can I do this?
The MySQL GRANT command does not accept wildcard for user definition.
A simpler option is to define for a specific host and without specifying a user:
GRANT ALL PRIVILEGES ON nomedobanco.* TO ''@'localhost' IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION;
In this case, any user authenticated by localhost will have the permissions granted.
Another way is to define each of the users:
GRANT ALL PRIVILEGES ON nomedobanco.* TO
'usuario1'@'localhost',
'usuario2'@'localhost',
'usuario3'@'localhost';