Go Back   HostGator Peer Support Forums > HostGator Peer Support Forums > Shared Hosting Support

Notices

Reply
 
Thread Tools
  #1  
Old 03-06-2007, 10:11 AM
Hadoken's Avatar
Hadoken Hadoken is offline
Baby Croc
 
Join Date: Feb 2006
Posts: 56
Default [MySQL] - How to remote access from a php page ?

Hello everybody,
I am trying to connect to my database (on a shared server) from my local site.
I added my IP on MySQL settings (on cpanel).
When I am trying to connect to my databse I have the following error message :

Warning: mysql_connect() [function.mysql-connect]: Client does not support authentication protocol requested by server; consider upgrading MySQL client in e:\development\....php on line 2
Client does not support authentication protocol requested by server; consider upgrading MySQL client

It's a very strange message because I have MySQL 4.1.22.
What can I do ?

Thank you very much and have a great day
Best regards,
Hadoken
Reply With Quote
  #2  
Old 03-06-2007, 03:03 PM
ladynada's Avatar
ladynada ladynada is offline
Hatchling Croc
 
Join Date: Feb 2007
Posts: 26
Default Re: [MySQL] - How to remote access from a php page ?

from my notes last nite:

log into mysql and change the password to use the old algorithm:

SET PASSWORD FOR username@hostname = OLD_PASSWORD('mypassword');

you can enable the "old-passwords" option on the MySQL Server. The options file is typically "my.ini" or "my.cnf" and is located in the MySQL Server data directory. Make sure there is a line in the file like this:

old-passwords

I have old_passwords=1 in my.ini and it works

All I did was set my pw to a different one, and then the next time I logged in, mysql was using the old method. hope this works for you
__________________
Reply With Quote
  #3  
Old 03-06-2007, 04:07 PM
Hadoken's Avatar
Hadoken Hadoken is offline
Baby Croc
 
Join Date: Feb 2006
Posts: 56
Default Re: [MySQL] - How to remote access from a php page ?

Hello Ladynada,
Thank you very much for the answer.

Well, I already did "SET PASSWORD FOR username@hostname = OLD_PASSWORD('mypassword');" some weeks ago because I encountered the same problem on my local PC.
It is very strange because I have no error message from MySQL when I am testing my site on my PC. But when I try to reach the hostgator database from my Local PC, I have the error message from my last post.

Well, I created the "old_passwords=1" line in "my.ini" file, but it still don't work (I restarted Apache and MySQL too).

Do you have any other idea ? (I will continu to search on my side)

Thank you very much.
Best regards,
Hadoken
Reply With Quote
  #4  
Old 03-07-2007, 11:51 AM
ladynada's Avatar
ladynada ladynada is offline
Hatchling Croc
 
Join Date: Feb 2007
Posts: 26
Default Re: [MySQL] - How to remote access from a php page ?

Quote:
Originally Posted by Hadoken View Post
Hello Ladynada,
Thank you very much for the answer.

<snip>

Do you have any other idea ? (I will continu to search on my side)

Thank you very much.
Best regards,
Hadoken
Nothing new to add, but I am about to install a forum on my site for the first time, so if I find an answer, I will reply here.
nada
__________________
Reply With Quote
  #5  
Old 03-07-2007, 01:53 PM
ladynada's Avatar
ladynada ladynada is offline
Hatchling Croc
 
Join Date: Feb 2007
Posts: 26
Default Re: [MySQL] - How to remote access from a php page ?

hi, I found this on another thread

batdesign
Hatchling Croc
Join Date: Jan 2007
Posts: 6


Re: MySQL errors?
Just to confirm this for anyone else searching on this topic in future.
I was having problems connecting to the mysql database with the correct username and password, port and host even with my IP address listed as an access host.
I added the db username to the database again and it connected straight away after that.
Wasted an hour on this, so if this helps anyone...
__________________
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -5. The time now is 05:50 PM.