raman Posted September 30, 2008 Share Posted September 30, 2008 There is a default table called user in mysql in which there are five users including two anonymous users which I have deleted from my database.For thE root account I had set up a password using mysqladmin -u root password "applutiu". When I connect to mysql in php scripts thru mysql_connect, if I give mysql_connect("127.0.0.1","root","applutiu") it can connect . with mysql_connect("localhost.localdomain","root","applutiu") also it can connect. However with mysql_connect("localhost","root","applutiu") it CANNOT CONNECT .CAN SOMEONE EXPLAIN why ? These are three columns from the user table : Host User Password localhost root 4ef545h575h5u8iy9s localhost.localdomain root 127.0.0.1 root Quote Link to comment https://forums.phpfreaks.com/topic/126429-anonymous-users-in-mysql/ Share on other sites More sharing options...
fenway Posted October 4, 2008 Share Posted October 4, 2008 localhost and 127.0.0.1 are not necessarily equivalent, especially on linux, unless they have been defined as such. Quote Link to comment https://forums.phpfreaks.com/topic/126429-anonymous-users-in-mysql/#findComment-657265 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.