Jump to content


Photo

mysql_connect error


  • Please log in to reply
11 replies to this topic

#1 corbin

corbin
  • Staff Alumni
  • Advanced Member
  • 8,129 posts

Posted 02 July 2006 - 03:34 AM

So, I'm trying to connect to my MySQL server on my computer from my remotely hosted site... I'm connecting with a script like:

mysql_connect($db_host, $db_user, $db_pass) or die(mysql_error());
mysql_select_db($db_database);

and I'm getting the error "Client does not support authentication protocol requested by server; consider upgrading MySQL client".  I would appreciate it if someone could tell me what is causing that error and if its possible to fix it.

Thanks to anyone who helps.
Why doesn't anyone ever say hi, hey, or whad up world?

#2 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 02 July 2006 - 03:43 AM

This to me sounds like you have not got the password and username set in the mysql root.

Intresting.

are you using a provider for hosting or your own setup.



try like this ok

mysql_connect("localhost") or die(mysql_error());
mysql_select_db("database_name");


Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#3 Drumminxx

Drumminxx
  • Members
  • PipPipPip
  • Advanced Member
  • 92 posts
  • LocationUSA

Posted 02 July 2006 - 03:46 AM

I never ran into this problem myself, but....

a quick search found this result from another forum.

This will fix it.  you need to run this at the mysql command prompt because
of the different password authentications


SET PASSWORD FOR 'zoooz'@'some_host' = OLD_PASSWORD('mypass');

zoooz is the username
some_host is the host
mypass is the password you want

:: gucci.com ::
:: blockbuster.com ::

--------------------

#4 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 02 July 2006 - 03:50 AM

Drumminxx is that code used in the command prompt msdos root of mysql admin


example
mysql> SET PASSWORD FOR root@localhost=PASSWORD('new_password');
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#5 Drumminxx

Drumminxx
  • Members
  • PipPipPip
  • Advanced Member
  • 92 posts
  • LocationUSA

Posted 02 July 2006 - 03:53 AM

Drumminxx is that code used in the command prompt msdos root of mysql admin


example
mysql> SET PASSWORD FOR root@localhost=PASSWORD('new_password');



yes
:: gucci.com ::
:: blockbuster.com ::

--------------------

#6 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 02 July 2006 - 03:58 AM

Thank you.

was only for my self to properly understand cheers.

grate help mate.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#7 corbin

corbin
  • Staff Alumni
  • Advanced Member
  • 8,129 posts

Posted 02 July 2006 - 04:52 AM

Connecting to my own computer from a hosted site... Its not a wrong password.... its not a wrong host... My router is set up right... Its something wrong on the hosted side I think... I'm not sure though.
Why doesn't anyone ever say hi, hey, or whad up world?

#8 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 02 July 2006 - 05:05 AM

dont understand connected to my computer to a hosted site?

if you run your own server then whats the hosted site got to do with anythink you should be the hoster ok.

one or the other .

you can not controll a hosting service via your pc ok you goto the providers online hosting controlls ok.

any mysql for the hosting company should be uploaded to there site not yours.

unless you are the hosting company and tellnetting in via msdos.

I get the inpression that your trying to setup a dynamic ip address linking to your computer but thats not a php problam sorry.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#9 Drumminxx

Drumminxx
  • Members
  • PipPipPip
  • Advanced Member
  • 92 posts
  • LocationUSA

Posted 02 July 2006 - 05:23 AM

You just may have the right password but a newer version of mysql uses a different password authentication so you need to tell mysql to use the old password authentication

SET PASSWORD FOR 'zoooz'@'some_host' = OLD_PASSWORD('mypass');

of course this is only good if you have that kind of access otherwise you'll need to contact your hosting provider

here is some more info on this matter
http://dev.mysql.com...old-client.html

:: gucci.com ::
:: blockbuster.com ::

--------------------

#10 corbin

corbin
  • Staff Alumni
  • Advanced Member
  • 8,129 posts

Posted 02 July 2006 - 05:55 AM

You just may have the right password but a newer version of mysql uses a different password authentication so you need to tell mysql to use the old password authentication

SET PASSWORD FOR 'zoooz'@'some_host' = OLD_PASSWORD('mypass');

of course this is only good if you have that kind of access otherwise you'll need to contact your hosting provider

here is some more info on this matter
http://dev.mysql.com...old-client.html


Did it.  Same error.
Why doesn't anyone ever say hi, hey, or whad up world?

#11 Drumminxx

Drumminxx
  • Members
  • PipPipPip
  • Advanced Member
  • 92 posts
  • LocationUSA

Posted 02 July 2006 - 05:59 AM

hhmm...
did you restart mysql?

here is some more info

http://www.phplivesu...icle.php?aid=72

sorry if this doesn't help
:: gucci.com ::
:: blockbuster.com ::

--------------------

#12 corbin

corbin
  • Staff Alumni
  • Advanced Member
  • 8,129 posts

Posted 02 July 2006 - 07:27 PM

hhmm...
did you restart mysql?

here is some more info

http://www.phplivesu...icle.php?aid=72

sorry if this doesn't help


That worked! Thanks :)
Why doesn't anyone ever say hi, hey, or whad up world?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users