root@localhost and root@%

[expired user #3515]'s profile image [expired user #3515] posted 16 years ago in General Permalink
I am a newbie here. I really don't know much about MySQL but am wanting to learn. We have a MySQL application that I must support and I have reset the password for the root user. Can anyone tell me what the difference is between root@localhost and root@%?

I had received a tool called MySQL front. Of course the version we are using is no longer supported(version 3.15) but as I learn more, I am hoping to update it. The vendor sent me this tool to change the password for both users. I don't understand how I can connect using root@%?

Thanks
Debh
[expired user #3333]'s profile image [expired user #3333] posted 16 years ago Permalink
root@% = allows connection from user 'root' from any host, local or TCP (internet)


root@localhost = only allows connection from 'root' on the machine running the MySQL server. Hence, LOCALhost. Cannot be accessed from any other computer and/or network using the 'root' user.


I hope this helps clarify.
[expired user #3515]'s profile image [expired user #3515] posted 16 years ago Permalink
Yes. Thanks. I used the tool MySQL front to change the passwords. It is easy to verify the root@localhost. How do I use the root@% to verify the password? Do I make an ODBC connection? Is there a command I can run at the command line?
ansgar's profile image ansgar posted 16 years ago Permalink
You could either use another computer in your LAN to connect to this server, which would then match the % host, as it is not localhost in that case. Or, temporary rename the username of the root@localhost to something@localhost, then try to connect on the same computer.
[expired user #3515]'s profile image [expired user #3515] posted 16 years ago Permalink
Thanks. I understand that I can use another pc to connect to it, but how? Can you use an ODBC connection? Are their commands I can use at a command prompt to establish a connection?

Please login to leave a reply, or register at first.