I have a user called ‘test’@’111.11.11.111’ (for example).
When i call
mysql_connect('localhost', //mysql is hosted locally (as far as php is concerned)
'test', //user is test
'password');//test's password
it automatically tries to login ‘test’@’localhost’. Trying test@111.11.11.111 for username results in test@111.11.11.111@localhost to try logging in.
Can I tell php or mysql to log in ‘test’@’111.11.11.111’?
EDIT: The mysql server is hosted on localhost (from php’s perspective). The IP of server hosting the mysql database is something other than 111.11.11.111. The user is logging into the mysql server from IP address 111.11.11.111
I don’t think so, the point of setting where a user can connect from on the MySQL server (in this case ‘111.11.11.111’) is for security. PHP can’t override that security as far as I know.