distal-attribute
distal-attribute
distal-attribute
distal-attribute

root@localhost and root@%

debh posted 7 years ago in General
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
Dr. Dave posted 7 years ago
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.
debh posted 7 years ago
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 posted 7 years ago
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.
debh posted 6 years ago
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.