marrowyung
asked on
grant MySQL user full right on everything
hi,
now setup the first MySQL 5.7. 19 and now created a user to access it from a remote machine.
how can I grant the full right on everything to this user by doing this:
GRANT usage on *.* TO xyz@localhost;
what I got is :
ERROR 1133 (42000): Can't find any matching row in the user table
GRANT ALL PRIVILEGES on *.* TO xyz@localhost;
and I got :
ERROR 1133 (42000): Can't find any matching row in the user table
the same message,
how can I solve it?
now setup the first MySQL 5.7. 19 and now created a user to access it from a remote machine.
how can I grant the full right on everything to this user by doing this:
GRANT usage on *.* TO xyz@localhost;
what I got is :
ERROR 1133 (42000): Can't find any matching row in the user table
GRANT ALL PRIVILEGES on *.* TO xyz@localhost;
and I got :
ERROR 1133 (42000): Can't find any matching row in the user table
the same message,
how can I solve it?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
David,
I tried that before, still doesn;'t work, that's why I use this.
GRANT ALL PRIVILEGES on *.* TO xyz@localhost;
I tried that before, still doesn;'t work, that's why I use this.
GRANT ALL PRIVILEGES on *.* TO xyz@localhost;
ASKER
Thomas.
I just want to create another account with the same as root permisson, so I do this:
mysql> CREATE USER 'finley'@'localhost' IDENTIFIED BY 'some_pass';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'finley'@'localhost'
-> WITH GRANT OPTION;
mysql> GRANT RELOAD,PROCESS ON *.* TO 'admin'@'localhost';
?
I just want to create another account with the same as root permisson, so I do this:
mysql> CREATE USER 'finley'@'localhost' IDENTIFIED BY 'some_pass';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'finley'@'localhost'
-> WITH GRANT OPTION;
mysql> GRANT RELOAD,PROCESS ON *.* TO 'admin'@'localhost';
?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
hi,
when doing this:
GRANT ALL PRIVILEGES ON *.* TO 'finley'@'localhost' WITH GRANT OPTION;
I got:
ERROR 1133 (42000): Can't find any matching row in the user table
from my point of view, that login doesn't exist, I did change finley to a test account which I already created ( I can login using that account by Toad for MySQL, it works.).
I also tried to login using that test account using command mode and it can login too. can't see why. I can do :
select @@version;
it returns result.s
when doing this:
GRANT ALL PRIVILEGES ON *.* TO 'finley'@'localhost' WITH GRANT OPTION;
I got:
ERROR 1133 (42000): Can't find any matching row in the user table
from my point of view, that login doesn't exist, I did change finley to a test account which I already created ( I can login using that account by Toad for MySQL, it works.).
I also tried to login using that test account using command mode and it can login too. can't see why. I can do :
select @@version;
it returns result.s
ASKER
finally found out why:
select host, user from mysql.user;
shows me that the user account is on the host '%' any reason ?
I create the user account by doing this:
CREATE USER finley IDENTIFIED BY 'some_pass'; instead of CREATE USER 'finley'@'localhost' IDENTIFIED BY 'some_pass';
any diff ?
so finally I do this:
CREATE USER 'finley'@'$' IDENTIFIED BY 'some_pass';
this is it. and Toad for MysQL verified that it works.
select host, user from mysql.user;
shows me that the user account is on the host '%' any reason ?
I create the user account by doing this:
CREATE USER finley IDENTIFIED BY 'some_pass'; instead of CREATE USER 'finley'@'localhost' IDENTIFIED BY 'some_pass';
any diff ?
so finally I do this:
CREATE USER 'finley'@'$' IDENTIFIED BY 'some_pass';
this is it. and Toad for MysQL verified that it works.
ASKER
tks all even I figure it out myself.
Change the user name from xyz@localhost to 'xyz'@'localhost' + see if your GRANT works now.