Sample Header Ad - 728x90

How to create a mysql user that can access from any host but localhost

1 vote
1 answer
1576 views
I was asked to create a mysql user that can connect to the server from any host but localhost. I tend to believe that "%" also means localhost but according to my teacher, localhost is not part of "%" and that CREATE USER user@"%"; should do the job but my tests proof otherwise. enter image description here The only solution that I've found to solve the problem is with CREATE USER user@localhost ACCOUNT LOCK; Can anybody educate me about this?
Asked by ptor (11 rep)
Nov 24, 2021, 03:38 AM
Last activity: Mar 6, 2025, 10:05 PM