Create a super user in MySQL 5.5 not working: Permission denied for root@localhost
- by GHarping
Using CentOS 6, logged in to MySQL as root, entering the command:
create user 'user123' identified by 'pass123';
works fine. But when I try and give that user super user privileges with:
grant all on *.* to 'user123' identified by 'pass123';
I get the error:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Then
select * from mysql.user;
shows that root has Y in all columns, so should have all privileges.
I'd be very grateful if anyone could help me find why root is unable to grant privileges as I can't see why it wouldn't be working.
Thanks