Hi Doug,
Can you connect using mysql -u $MySQLUser -p $MySQLPassword -h
$MySQLServer? Without the -h option, the mysql client will connect via
localhost and also via a unix socket rather than tcp/ip, by testing it
as mentioned above, this will ensure it will actually connect to that
host with that user/password combination. Please ensure that the
$MySQLServer is exactly the same as in the php script.
Regards
---------------------------------------------------------------
********** _/ ********** David Logan
******* _/ ******* ITO Delivery Specialist - Database
***** _/ ***** Hewlett-Packard Australia Ltd
**** _/_/_/ _/_/_/ **** E-Mail: [EMAIL PROTECTED]
**** _/ _/ _/ _/ **** Desk: +618 8408 4273
**** _/ _/ _/_/_/ **** Mobile: 0417 268 665
***** _/ ******
****** _/ ******** Postal: 148 Frome Street,
******** _/ ********** Adelaide SA 5001
Australia
i n v e n t
---------------------------------------------------------------
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 17 January 2006 2:55 PM
To: Logan, David (SST - Adelaide)
Cc: [email protected]
Subject: RE: error connecting to db.
Thanks for the link I am glad the site has added manuals for multiple
versions.
I think I have access and db privileges set properly. I can (in effect)
login to
the server from the host command line using:
mysql -u $MySQLUser -p $MySQLPassword
I showed the user table on the off chance that 127.0.0.1 does not map to
local
host and someone would clue me in to that. I have tried setting the host
for the
user to the IP and to 127.0.0.1.
Neither works. I think the problem probably lies with the mysql install
but I
do not know where to look. I am a PHP novice but AFAIK @mysql_connect
should be
like accessing mysql from the command line.
On Tue, 17 Jan 2006, Logan, David (SST - Adelaide) wrote:
> Hi Doug,
>
> It is probably failing because you changed the ip address. The
security
> system in MySQL is based around where a user is coming from. There is
> good documentation that is available here
>
> http://dev.mysql.com/doc/refman/5.0/en/privilege-system.html
>
> I've referred to the current manual for ver. 5.0 as I'm not sure what
> you are using. You can easily refer to an earlier version of the
manual
> via the http://dev.mysql.com/doc/ page.
>
> Regards
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 17 January 2006 1:07 PM
> To: [email protected]
> Subject: error connecting to db.
>
> I have a php application that connects with MySQL using:
>
> $SvrConn = @mysql_connect($MySQLServer, $MySQLUser, $MySQLPassword)
>
_____
Douglas Denault
http://www.safeport.com
[EMAIL PROTECTED]
Voice: 301-469-8766
Fax: 301-469-0601
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]