Re: Re: mysql_connect noob question
| From: | Stuart Dallas | Date: | Sun, 21 Apr 2013 23:23:54 +0000 |
| Subject: | Re: Re: mysql_connect noob question | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-320947@lists.php.net to get a copy of this message | ||
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
--
Stuart Dallas
3ft9 Ltd
http://3ft9.com/