Re: Re: mysql_connect noob question
| From: | Glob Design Info | Date: | Sun, 21 Apr 2013 23:33:13 +0000 |
| Subject: | Re: Re: mysql_connect noob question | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-320951@lists.php.net to get a copy of this message | ||
As shown in the OP I am already doing that in the PHP scipt:
$host = "instance43490.db.xeround.com:8904";
And then passing that as the 1st param to mysql_connect
On 4/21/13 4:23 PM, Stuart Dallas wrote:
On 22 Apr 2013, at 00:14, Glob Design Info <info@globdesign.com> 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