2
I want to create a database where only one user can access the information. Although there are already users created on the server, but only the user I create has to be the only one to have access to a certain database. I’m only able to do the reverse "create user for a single database". I am using this syntax to create the database, the user and their permission:
CREATE DATABASE test
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE utf8_general_ci;
CREATE USER 'root'@'%' IDENTIFIED BY 'testing';
GRANT ALL ON test.* TO 'root'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
Your question begets conflict when you say that I’m only able to do the reverse "create user for a single database. But after all, what you need?
– durtto
Take a look at the documentation using revoke to revoke other users' permissions. Mysql Doc I hope it helps.
– Danilo Silva
@durtto when I said "Being able to do the Reverse" I meant creating a user with permissions in all databases. and I need a database where a user has permission only.
– Joaquim Costa