MySQL Forums
Forum List  »  MySQL Administrator

I can create user privilege via domain name instead of ip address?
Posted by: fei lee
Date: June 30, 2011 07:26PM

Dear Sir/Madam,

i have the server as following:
[CLIENT]
domain name: db.host.com
ip address : 211.133.145.123

[MYSQL SERVER]
ip address : 211.134.152.321

Then I created the following user privilege with domain name on mysql server:

CREATE USER 'user1'@'db.host.com' IDENTIFIED BY '***';
GRANT USAGE ON * . * TO 'user1'@'db.host.com' IDENTIFIED BY '***' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;

Then i tried to connect to the mysql server from db.host.com
[yunghee@localhost ~]$ mysql -h 211.134.152.321 -u gsm -p
Enter password:
ERROR 1045 (28000): Access denied for user 'user1'@'211.133.145.123' (using password: YES)

Then i found that if i create user with ip address instead of domain name, i can login to the mysql server.

My question is, can i create user privilege via domain name instead of ip address? This is because the ip address of my domain name is dynamic.

Thanks for every advice!

Lee

Options: ReplyQuote


Subject
Written By
Posted
I can create user privilege via domain name instead of ip address?
June 30, 2011 07:26PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.