How to Grant All Privileges user on a Database in MySQL on Ubuntu

Viewed 18

I have blocker, i can not to give privileges in my new root (user) if i give password.

ex.

sudo mysql
mysql> CREATE USER 'admin'@'localhost' IDENTIFIED BY '12345';
mysql> GRANT ALL PRIVILEGES ON *.* TO ‘admin’@’localhost’ IDENTIFIED BY '12345';

But, it is not working for me, end the output is like this :

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY '12345'' at line 1

i had to try and i heve not been success, but if i do not use password, it is working.

sudo mysql
mysql> CREATE USER 'admin'@'localhost';
mysql> GRANT ALL PRIVILEGES ON *.* TO ‘admin’@’localhost’;

I want to use password, please help me.

0 Answers
Related