corbin Posted July 2, 2006 Share Posted July 2, 2006 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:[code]mysql_connect($db_host, $db_user, $db_pass) or die(mysql_error());mysql_select_db($db_database);[/code]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. Quote Link to comment https://forums.phpfreaks.com/topic/13424-mysql_connect-error/ Share on other sites More sharing options...
redarrow Posted July 2, 2006 Share Posted July 2, 2006 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 okmysql_connect("localhost") or die(mysql_error());mysql_select_db("database_name"); Quote Link to comment https://forums.phpfreaks.com/topic/13424-mysql_connect-error/#findComment-51837 Share on other sites More sharing options...
Drumminxx Posted July 2, 2006 Share Posted July 2, 2006 I never ran into this problem myself, but....a quick search found this result from another forum.[color=navy]This will fix it. you need to run this at the mysql command prompt because of the different password authenticationsSET PASSWORD FOR 'zoooz'@'some_host' = OLD_PASSWORD('mypass');zoooz is the usernamesome_host is the hostmypass is the password you want[/color] Quote Link to comment https://forums.phpfreaks.com/topic/13424-mysql_connect-error/#findComment-51838 Share on other sites More sharing options...
redarrow Posted July 2, 2006 Share Posted July 2, 2006 Drumminxx is that code used in the command prompt msdos root of mysql adminexamplemysql> SET PASSWORD FOR root@localhost=PASSWORD('new_password'); Quote Link to comment https://forums.phpfreaks.com/topic/13424-mysql_connect-error/#findComment-51839 Share on other sites More sharing options...
Drumminxx Posted July 2, 2006 Share Posted July 2, 2006 [quote author=redarrow link=topic=99151.msg390326#msg390326 date=1151812220]Drumminxx is that code used in the command prompt msdos root of mysql adminexamplemysql> SET PASSWORD FOR root@localhost=PASSWORD('new_password'); [/quote]yes Quote Link to comment https://forums.phpfreaks.com/topic/13424-mysql_connect-error/#findComment-51842 Share on other sites More sharing options...
redarrow Posted July 2, 2006 Share Posted July 2, 2006 Thank you.was only for my self to properly understand cheers.grate help mate. Quote Link to comment https://forums.phpfreaks.com/topic/13424-mysql_connect-error/#findComment-51846 Share on other sites More sharing options...
corbin Posted July 2, 2006 Author Share Posted July 2, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/13424-mysql_connect-error/#findComment-51863 Share on other sites More sharing options...
redarrow Posted July 2, 2006 Share Posted July 2, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/13424-mysql_connect-error/#findComment-51868 Share on other sites More sharing options...
Drumminxx Posted July 2, 2006 Share Posted July 2, 2006 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 authenticationSET PASSWORD FOR 'zoooz'@'some_host' = [b]OLD_PASSWORD[/b]('mypass');of course this is only good if you have that kind of access otherwise you'll need to contact your hosting providerhere is some more info on this matterhttp://dev.mysql.com/doc/refman/5.0/en/old-client.html Quote Link to comment https://forums.phpfreaks.com/topic/13424-mysql_connect-error/#findComment-51871 Share on other sites More sharing options...
corbin Posted July 2, 2006 Author Share Posted July 2, 2006 [quote author=Drumminxx link=topic=99151.msg390361#msg390361 date=1151817804]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 authenticationSET PASSWORD FOR 'zoooz'@'some_host' = [b]OLD_PASSWORD[/b]('mypass');of course this is only good if you have that kind of access otherwise you'll need to contact your hosting providerhere is some more info on this matterhttp://dev.mysql.com/doc/refman/5.0/en/old-client.html[/quote]Did it. Same error. Quote Link to comment https://forums.phpfreaks.com/topic/13424-mysql_connect-error/#findComment-51881 Share on other sites More sharing options...
Drumminxx Posted July 2, 2006 Share Posted July 2, 2006 hhmm...did you restart mysql?here is some more infohttp://www.phplivesupport.com/documentation/viewarticle.php?aid=72sorry if this doesn't help Quote Link to comment https://forums.phpfreaks.com/topic/13424-mysql_connect-error/#findComment-51882 Share on other sites More sharing options...
corbin Posted July 2, 2006 Author Share Posted July 2, 2006 [quote author=Drumminxx link=topic=99151.msg390372#msg390372 date=1151819956]hhmm...did you restart mysql?here is some more infohttp://www.phplivesupport.com/documentation/viewarticle.php?aid=72sorry if this doesn't help[/quote]That worked! Thanks :) Quote Link to comment https://forums.phpfreaks.com/topic/13424-mysql_connect-error/#findComment-52162 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.