Mohamed Atef
Published in : 2022-04-01
When I try to Grant Privileges to user called mo-atef I get this error
ERROR 1410 (42000): You are not allowed to create a user with GRANT
I started Mysql using this command
mysql -u root -p
so How I don't have permission to do it?
I created the user using
CREATE USER 'mo-atef'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
Any idea about it?
Jo Micheal Date : 2022-04-01
Best answers
5
Best answers
5
It's weird, this should be working because you used the root user, can you please run this command to make sure that the user is created successfully?
USE mysql;
then get the users table using
SELECT user FROM user;
take a look at the table and see if your user exists or no, If no please create it like this
CREATE USER 'mo-atef'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
then you can Grant the privileges using this command
GRANT CREATE, ALTER, DROP, INSERT, UPDATE, DELETE, SELECT, REFERENCES, RELOAD on *.* TO 'mo-atef'@'localhost' WITH GRANT OPTION;
Good luck
Join our community and get the chance to solve your code issues & share your opinion with us
Sign up Now