Current location: Hot Scripts Forums » Programming Languages » PHP » PHP scripts unable to connect to DB after MySQL 4.1.10 upgrade


PHP scripts unable to connect to DB after MySQL 4.1.10 upgrade

Reply
  #1 (permalink)  
Old 03-07-05, 09:53 AM
Jason L Jason L is offline
New Member
 
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Question PHP scripts unable to connect to DB after MySQL 4.1.10 upgrade

Using Apache 1.3.31, PHP 4.3.8 and MySQL 4.1.10 on Win XP home edition. Prior to MySQL 4.1.10, I was using MySQL 4.0.18. The PHP scripts were able to connect to the database. After the upgrade, PHP scripts can't connect to the database.

Are there any specifications for MySQL 4.1.10 to work with PHP/Apache???

I would like to try to solve this before using the "System Restore" option.

TIA

Jason
Reply With Quote
  #2 (permalink)  
Old 03-07-05, 01:31 PM
greybird greybird is offline
Newbie Coder
 
Join Date: Dec 2004
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
What error do you get?
Reply With Quote
  #3 (permalink)  
Old 03-07-05, 09:35 PM
moronovich moronovich is offline
Junior Code Guru
 
Join Date: Oct 2004
Posts: 460
Thanks: 0
Thanked 0 Times in 0 Posts
maybe your php script uses mysql extension. for mysql 4.1.x and up, this extension doesn't work. instead, you should use mysqli or the beta version PDO.

anyway, if you're not experienced enough with php (or to modify whole scripts), i suggest you rollback the change and upgrade your mysql to 4.0.2x

regards,
__________________
just an ignorant noob with moronic solution...
Reply With Quote
  #4 (permalink)  
Old 03-08-05, 12:32 AM
Jason L Jason L is offline
New Member
 
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Thank you all for the replies.

Modified the scripts to print out the error message

"Client does not support authentication protocol requested by server; consider upgrading MySQL client ... "

Did a google on it, "MySQL 4.1 and up uses an authentication protocol based on a password hashing algorithm that is incompatible with that used by older clients"

" Reset the password to pre-4.1 style for each user that needs to use a pre-4.1 client program. This can be done using the SET PASSWORD statement and the OLD_PASSWORD() function:

mysql> SET PASSWORD FOR
-> 'some_user'@'some_host' = OLD_PASSWORD('newpwd'); "


Time for me to read more documentation on MySQL 4.1.10....

Once again, thank you for the replies.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and MySQL ? rob2132 Hot Scripts Forum Questions, Suggestions and Feedback 4 08-29-08 02:22 AM
RESELLER WEB HOSTING - $9.99/MONTH For 4GB HD & 30GB BW! CPanel, PHP, MySQL & MORE! IncognitoNet General Advertisements 0 02-20-05 11:51 AM
RESELLER WEB HOSTING - $9.99/MONTH For 4GB HD & 30GB BW! CPanel, PHP, MySQL & MORE! IncognitoNet General Advertisements 0 11-25-04 02:09 AM
When I try to connect to mysql from php I get this error: "Call to unsupported or.... laxy_m PHP 2 09-29-04 07:11 AM
Unable to connect to MSSQL with PHP through a firewall whiplashdomain PHP 1 01-31-04 07:17 PM


All times are GMT -5. The time now is 05:34 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.