0

I have executed following commands to create new user

CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
FLUSH PRIVILEGES;

Now I have exit from Mysql. Again I have enter in mysql terminal with "newuser"

Then Again I have created new user with following commands

CREATE USER 'newuser2'@'localhost' IDENTIFIED BY 'password';
    GRANT ALL PRIVILEGES ON * . * TO 'newuser2'@'localhost';
    FLUSH PRIVILEGES;

It returns following error

mysql> grant all privileges on *.* to newuser2@localhost identified by 'pass' with grant option;
ERROR 1045 (28000): Access denied for user 'newuser'@'localhost' (using password: YES)
Ravendra Kumar
  • 1,072
  • 10
  • 29
  • Possible duplicate of [MySQL: Grant \*\*all\*\* privileges on database](http://stackoverflow.com/questions/5016505/mysql-grant-all-privileges-on-database) – Matt Gibson Nov 30 '16 at 09:02
  • [To use GRANT, you must have the GRANT OPTION privilege, and you must have the privileges that you are granting.](http://dev.mysql.com/doc/refman/5.7/en/grant.html) – Matt Gibson Nov 30 '16 at 09:03

0 Answers0