MySql Connect Failure

Problems with the Windows version of XAMPP, questions, comments, and anything related.

MySql Connect Failure

Postby zardiw » 01. September 2011 20:12

Hey all. Trying to connect to a hosted mySQL server and it's not working.

1. Both local and hosted mySql Server have old_passwords turned on.
2. Both servers generate the exact same 16byte Hash code on a SELECT Password('mypassword'); SQL Query.
3. I've tried an old libmysql.dll on my local side
4. SQLyog can connect just fine

Yet I still get this error when I try to connect using a PHP script:

An Error Occured!
Error Number: 2
Error Description: mysql_connect() [function.mysql-connect]: Premature end of data (mysqlnd_wireprotocol.c:554)
Error In File: X:\xampp\htdocs\PHP\8KCoxxxxxxxxxx3.php
Error On Line: 13
An Error Occured!
Error Number: 2
Error Description: mysql_connect() [function.mysql-connect]: OK packet 1 bytes shorter than expected
Error In File: X:\xampp\htdocs\PHP\8KCxxxxxxxxxxxxx3.php
Error On Line: 13
An Error Occured!
Error Number: 2
Error Description: mysql_connect() [function.mysql-connect]: mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file
Error In File: X:\xampp\htdocs\PHP\8KCxxxxxxxxxxxxxx3.php
Error On Line: 13

z
zardiw
 
Posts: 19
Joined: 01. September 2011 20:06

Re: MySql Connect Failure

Postby zardiw » 01. September 2011 21:44

Found out that 1.7.4/5 will not connect to a MySql server that is using the variable: old_passwords=ON

SO, uninstalled 1.7.5

Installed 1.7.3.

Now getting 500 server error. Can NOT get to localhost main page to finish setup

Navigating to 127.0.0.1 asks for user/pw, which I entered (apparently it keeps that during the uninstall)........and got the 500 error again

What a PITA...........

z
zardiw
 
Posts: 19
Joined: 01. September 2011 20:06

Re: MySql Connect Failure

Postby zardiw » 01. September 2011 21:47

OH........and also checked mod rewrite in httpd.conf:

#LoadModule proxy_connect_module modules/mod_proxy_connect.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
#LoadModule speling_module modules/mod_speling.so
#LoadModule ssl_module modules/mod_ssl.so
LoadModule status_module modules/mod_status.so
#LoadModule substitute_module modules/mod_substitute.so
#LoadModule unique_id_module modules/mod_unique_id.so
#LoadModule userdir_module modules/mod_userdir.so

So apparently that is not it.............z
zardiw
 
Posts: 19
Joined: 01. September 2011 20:06

Re: MySql Connect Failure

Postby zardiw » 01. September 2011 21:55

OK.......did the uninstall.bat.......and uninstalled 1.7.3

THEN.....went in there and deleted a bunch of crap in htdocs folder that wasn't part of my existing site files.

Deleted a bunch of crap from the mysql folder also........tried not to delete my existing database........but probably failed miserably......remains to be seen

REinstalled 1.7.3 and wonder of wonders, got to the Xampp main page via localhost.........I feel blessed................z
zardiw
 
Posts: 19
Joined: 01. September 2011 20:06

Re: MySql Connect Failure

Postby zardiw » 01. September 2011 22:05

Yup.. Failed miserably on not deleting my database.........cause although I DID NOT remove what I THOUGHT was my database folder.....when I went to phpMyAdmin.......guess what........Database still there!.......bad news......tables GONE..............

But never fear, subconsious guidance is HERE>>>>>>>>>>>>>>>>.

Looked at my back up folder......yes, Constance........I DO keep backups....a lot of the freaking things.......and GUESS WHAT.........

I found a file called ibdata1............that looked like it was big enough to have tables .....and chairs....and maybe even some silverware in it........

Copied from backup to current..............and VOILA..........tables restored.........

NOW to get testing............see if that freaking mySql Connect works now............JOY JOY JOY........this be..........stay tuned...........z
zardiw
 
Posts: 19
Joined: 01. September 2011 20:06

Re: MySql Connect Failure

Postby zardiw » 01. September 2011 22:08

PS......don't you just hate it when the anal NOT retentive write code........who would have thought the table data would just lay there resting with it's feet up in the main data folder..........and not in my database folder.......hmm.......maybe that sucker is used for ALL the databases that one may create in a fit of GODLIKE behaviour.........in that case, my vote is Bad Design.......but then I wasn't there in the Garden of MySQL ............z
zardiw
 
Posts: 19
Joined: 01. September 2011 20:06

Re: MySql Connect Failure

Postby zardiw » 01. September 2011 22:10

Well Ladies and Germs........it seems our voyage has come to an end...........and I leave you with this simple message that I put in a test connect php script:

Started and connected apparently

z
zardiw
 
Posts: 19
Joined: 01. September 2011 20:06

Re: MySql Connect Failure

Postby zardiw » 01. September 2011 22:14

PS. And you just KNEW there was one coming didn't you?

I used to be a LAG type of guy..........and if the truth be told....I still sorta am........sort of like a effing heroin addict.

But there's something to be said for NOT upgrading.........Did you guys know that freaking Home Depot still uses DOS on their inventory program?????????


Yes. Companies are CHEAP CHEAP CHEAP........and won't upgrade unless the huns come over the walls and rape their wives and children....THEN they get the M40 Grenade Launchers from the arms dealer......and turn away from their beloved spears.....

PPS.

LAG=Latest and Greatest.........

And now I bid you all a well deserved fare thee well..............and I'll try not to let that oak door you got on the place hit me in the ass on my way out........z
zardiw
 
Posts: 19
Joined: 01. September 2011 20:06


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 61 guests