Re: [PHP] Re: mysql_connect noob question
[email protected] (Stuart Dallas)
| Newsgroups | php.general |
|---|---|
| Message-ID | <[email protected]> |
On 22 Apr 2013, at 00:14, Glob Design Info <[email protected]> wrote: > However, I may have found the problem: the port. As a security measure the BaaS provider appears to have changed MySQL to a non-standard port. So............ > > On the command line: > > sudo mysql --host=instance43490.db.xeround.com --port=8904 --user=<realuser> --password=<realpass> > > WORKS perfectly - entering the MySQL Monitor. > > However, on the same host, same command line: > > sudo mysql --host=instance43490.db.xeround.com:8904 --user=<realuser> --password=<realpass> The MySQL command line doesn't support putting the port number there, but the first parameter of mysql_connect does. If this is the problem then it cannot be true that replacing the variables you were taking from $_POST with literal strings for the username and password worked, as I asked earlier to which you said it does. Replace the first parameter to your mysql_connect call with 'instance43490.db.xeround.com:8904' and it will probably work. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/