Re: Connecting to Databases
| From: | Robb Kerr | Date: | Tue, 06 Apr 2004 15:43:47 +0000 |
| Subject: | Re: Connecting to Databases | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-182488@lists.php.net to get a copy of this message | ||
On Tue, 6 Apr 2004 10:24:29 -0500, Robb Kerr wrote:
> On Tue, 6 Apr 2004 11:18:11 -0400, John W. Holmes wrote:
>
>> From: "Robb Kerr" <rkerr@digitaliguana.com>
>>
>>> I have found that it is not uncommon when trying to connect to a database
>>> on an Apache server to get a return similar to "Access denied for user:
>>> username@IPAddress". I just ran into this problem because I wanted to use
>>> SQLyog to manipulate a table that already exists on one of my servers. I
>>> went to the "Connections" document that Dreamweaver creates and copied all
>>> of the connection info (host, db, user, password) exactly into the
>>> connection dialogue of SQLyog. The error message above was returned when I
>>> tried to connect although I can connect Dreamweaver to the database
>> without
>>> problem even though the IPAdress is not listed as part of the username.
>>
>> With MySQL, a user is given permission to connect with a specific username
>> and password _and_ from a specific host. When you run the script from
>> Dreamweaver, is it on the same machine as SQLYog? You probably just need to
>> modify your MySQL user to have permission to connect from "IPAddress".
>>
>> ---John Holmes...
>
> Unfortunately, SQLyog and Dreamweaver reside on the same machine. Should I
> create a new user for the database which is "username@IPAddress"? Why would
> SQLyog require this while Dreamweaver does not? And, why doesn't identical
> connection information work on both applications?
I solved the problem by adding my IP address to the Access Hosts list for
the database. Fortunately I use a cable modem with a static IP address, but
if I were using a dialup with a dynamic IP, would I have to add that IP as
an Access Host every time I dialed up? This seems wrong.
--
Robb Kerr
Digital IGUANA
Helping Digital Artists Achieve their Dreams
http://www.digitaliguana.com
http://www.cancerreallysucks.org