note 35158 added to function.mysql-connect
| From: | al at algorythm dot ca | Date: | Thu, 21 Aug 2003 14:53:11 +0000 |
| Subject: | note 35158 added to function.mysql-connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-54825@lists.php.net to get a copy of this message | ||
For those of you looking to connect to an external mySQL server, for instance to save your client
some outrageous charge every month with their current host, this might save you a headache, not to
mention the rest of your day...
You will have to modify the Hosts Allow on the mySQL of the external server to allow the connection
from your other site. phpMyAdmin has a textfield for this, or simply contact your administrator.
Anyways, lets say you are connecting from the site
yoursite.com, simply adding
yoursite.com or y.o.ur.IP to the Hosts Allow may not work. You could get
an error like:
> Warning: mysql_connect(): Access denied for user: 'yourUser@someOtherSite.com' <
All you need to do is add the someOtherSite.com to the Hosts Allow and your all set ...
that is to say, you may need to force this error in order to Allow the right host, especially with
all the resellers in resellers these days. ;)
----
Manual Page -- http://www.php.net/manual/en/function.mysql-connect.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35158
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35158&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35158&report=yes