Quantcast
Channel: MySQL Forums - Database Administration & Monitoring
Viewing all articles
Browse latest Browse all 812

Multiple host Names for a single host and privilege separation (no replies)

$
0
0
Hi all,
I want to map 127.0.0.1 to multiple names instead of the standard way as localhost. so my /etc/hosts file in ubuntu would have the following entries

127.0.0.1 localhost
127.0.0.1 localhost:extra1
127.0.0.1 localhost:extra2

Now, In my sql, i want to have a user named karthick and it should have different privileges.

select user,host from users;

the above statement shows

karthick localhost:extra1;
karthick localhost:extra2;

The command that i used to create a user was


My question:
????????????

1. I am not able to login by executing

mysql -u karthick -h localhost:extra1 -p

What would be the problem?

Motivation behind the question
=============================

I want to login as below

login 1:

mysql -u karthick -h localhost:extra1 -p

login 2:

mysql -u karthick -h localhost:extra2 -p


Now I want login 1 and login 2 to have different set of privileges... Hope this is possible

Viewing all articles
Browse latest Browse all 812

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>