Try uploading something like PhpMyAdmin and play around with the server
setting. Set it to (local) and verify it works, now try the IP address or
domain to the DB Server and see if that works.
How I overcame it was switch hosts. They would not expose the MySQL server
out and only supported access through Local from a website on the server.
--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
Veign's Blog
http://www.veign.com/blog
--
"Ian Davies" <ia********@virgin.net> wrote in message
news:sa***********@newsfe7-gui.ntli.net...
Thanks for the reply
I create the PHP files on my pc and upload them to the hosts server. I
connect with php using the following in my script.
mysql_pconnect($hostname, $username, $password)
presumably this is local as the PHP files are on the hosts server?
How do you connect to the DB through PHP? Is the server listed as
(local).
How can I confirm if the server listed as (local)?
How did you overcome the problem when you encountered it with your host? I
hope your not going to say I changed host :). Ive just paid for two years
hosting (I hope they offer refund)
Ian
"Veign" <NO***********@veign.com> wrote in message
news:uo**************@TK2MSFTNGP14.phx.gbl... Are you sure that the host exposes the MySQL database out? Some host
will
only allow access to MySQL DB's through (local) and not through an IP
address - I have had this issue with a host before...
--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
Veign's Blog
http://www.veign.com/blog
--
"Ian Davies" <ia********@virgin.net> wrote in message
news:Tb***************@newsfe1-gui.ntli.net... > Hello all
>
> The following code allows me to connect to a local MySQL database on my pc > from a VB6 project.
>
> ************************************************** ************************** > **
> Dim conn As ADODB.Connection
> Dim cs As String
> Dim MyServer As String
> Dim MyDb As String
> Dim MyUserID As String
> Dim MyPass As String
>
> MyServer = "servername"
> MyDb = "database"
> MyUserID = "MrUser"
> MyPass = "password"
>
> Set conn = New ADODB.Connection
>
> cs = "DRIVER={MySQL ODBC 3.51 Driver};"
> cs = cs & "server=" & MyServer & ";"
> cs = cs & "database=" & MyDb & ";"
> cs = cs & "uid=" & MyUserID & ";"
> cs = cs & "password=" & MyPass & ";"
>
> conn.ConnectionString = cs
> conn.CursorLocation = adUseClient
> conn.Open cs
>
> ************************************************** ************************* >
> However when I try to use it to connect to a remote database residing
> on
> my
> hosting companies server. I get the following message
>
> Runtime error '-2147467259(80004005)':
> [MySQL][ODBC 3.51 Driver]Access denied for user:
> 'm*************@client-80-13-38-51.brhm.adsl.virgin.net' (Using
> password:YES)
>
> The connection info re user, password, database, host etc are all correct. > And the database can be connected to from my site using SQL in PHP script. > I
> have the latest MyODBC installed correctly. Has anyone experienced this
> and
> if so how can it be resolved. In the error message it seems to think Im
> using a password 'YES' however I have no such password and am not using it > in my code anywhere.
>
> Ian
>
>