This question may have been asked many times but I can't find an answer that solves my problem. I want to create a user that can connect to MySQL (5.5.35) on my box from any computer and have all privileges on the schema except GRANT.
So I started with:
$ mysql -u root -p
and then
create user 'dbuser'@'%' identified by 'password';
grant usage on *.* TO 'dbuser'@'%';
grant all on testdb to 'dbuser'@'%';
grant all on testdb.* to 'dbuser'@'%';
flush privileges;
quit
But to my surprise when I tried to connect to the database with:
$ mysql -u dbuser -p testdb
I get the following error message:
ERROR 1045 (28000): Access denied for user 'dbuser'@'localhost'
(using password: YES)
and I did triple check the password. What am I doing wrong?
Cheers, Johan