Kind of a security question (I guess) - it's a bit confusing

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

mysql -h host -u user -p
Running the above command expects actual values to be substituted
for host and user. User I know about. That can be root. And now I
know that this root has NOTHING to do with the linux OS login root.
But host, now, that's a different matter. I think I have 2 host name
options. One is appserver and the other is localhost. I don't know
what the purpose of these are.

If I had to guess, I would say that root@localhost is my mysql login
ID if I am sitting at the linux box console intending to use the mysql
monitor to manipulate databases. To me, root@appserver suggests
that this login ID should be used by me if I am trying to do the same
administration, but from another PC somewhere - akin to remote
administration. Am I right or completely wrong?

According to the documentation, anonymous logins can be made just
by typing mysql. That works for me. But if I type simply mysql and
press ENTER, the mysql monitor assigns me a mysql user ID of mlh
or dewey (using my linux OS name as a tag) instead of
That is somewhat confusing to me.

Re: Kind of a security question (I guess) - it's a bit confusing

MLH wrote:

Quoted text here. Click to load it

appserver is a synonym for [type in your remote mysql server's ip
address or domain name here]

If your computers ip is then you will type:
mysql -h

Or if you have a domain name you will type:
mysql -h

If you trying to connect to a local server, you usually don't need to
use the -h parameter at all.

Site Timeline