Reputation: 78234
I don't get how to give a user permissions in MySQL.
I am using MySQL RDS on aws. I am creating a user and need access to the reports database.
I created a hash password and ran the below.
SELECT PASSWORD('Test123');
GRANT ALL PRIVILEGES ON reports.* TO 'central'@'localhost'
IDENTIFIED BY PASSWORD '*D1AD25EDF929F55FBFF703358EC527';
mysql -u central -pTest123 -h test.com
ERROR 1045 (28000): Access denied for user 'central'@'112.198.130.xxx' (using password: YES)
Why? What did I do wrong?
Upvotes: 0
Views: 101
Reputation: 125835
You granted permission to 'central'@'localhost'
but are attempting to authenticate as 'central'@'112.198.130.xxx'
. Either connect from localhost
, or grant permission to the appropriate hosts.
Upvotes: 2