close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

MySQL Connect Error on Development but not on Production Machine

Thread began 3/19/2010 9:56 am by yogastudents362523 | Last modified 3/20/2010 12:42 am by yogastudents362523 | 1582 views | 4 replies |

yogastudents362523

MySQL Connect Error on Development but not on Production Machine

OK. On to my next idiot's mistake.

I am getting the underneath error when connecting to my database from my home-based Development machine. Yet the exact same connection file, to the exact same database, using the exact same credentials, works OK upon the Production Machine located on my host's server.

Warning: mysql_pconnect() [function.mysql-pconnect]: OK packet 6 bytes shorter than expected in ... on line 9

Warning: mysql_pconnect() [function.mysql-pconnect]: mysqlnd cannot connect to MySQL 4.1+ using old authentication in ... on line 9

Fatal error: mysqlnd cannot connect to MySQL 4.1+ using old authentication in ... on line 9


The contents of the Connection.php script are a standard WebAssist file as follows:
$hostname_... = "www.xxxxx.com";
$database_yyyy = "yyyyy";
$username_yyyy = "zzzzzz";
$password_yyyyy = "youmustbekidding";
$sacredthread = mysql_pconnect($hostname_...., $username_sacredthread, $password_sacredthread) or trigger_error(mysql_error(),E_USER_ERROR);

That last line is the aforementioned Line 9.

I have already Googled the error. It's usually associated with a change in password procedures. However, I thought it might be best to figure out why this Fatal Error is happening ONLY when I run my file from my Production Machine (to connect to the specific database), yet the exact same credentials in the exact same file work OK when the file is located on the Server hosted by my ISP. I do not want to get my ISP to change any settings if it can be avoided.

I am sure this is simple. Most likely some setting in php.ini?

I have approached the wise here who I am sure know and have a simple remedy. Thanks.
Bye now.

Sign in to reply to this post

Office Guy-172461

Have a look here:
article.php?article=82

Keep in mind that you can use a different connection file for local and production, so there is no need to ask your provider to change anything. I add REMOTE to the connection file name on my local machine in case I accidentally overwrite the remote file with the one used in local testing. Then I can just upload the backup and change the name back.

If your local testing server is an older version, you might consider a new install of XAMPP to remove the password version problem. It might also be that your host is using an older version.

Sign in to reply to this post

yogastudents362523

Thanks. My PHP development build (installed 2 days ago) is newer than my production build (put there by my ISP).

My issue is addressed in that link and I'll work through it later today.
I am very grateful.
Bye now.

Sign in to reply to this post

yogastudents362523

OK. I have decided to cop out. I am simply going to copy all database information from my Production Server over to my Development Server and leave well alone. I think that should work. Please let me know if that won't.

_______________________
Irrelevant reasoning

Redacting the 5.3 build within WAMP on my Development Machine seems stupid. Won't do it. But MySQL surely works.

My ISP's PHP build on my Public Production Server is less than 5.3. It is their responsibility to update MySQL properly when they choose to update. If I mess around with it I risk not having support should I make an error. So best leave alone.

Connecting from 5.3 on my Development Server to MySQL within the pre-5.3 on the Production Server is broken. Can't do that.

So I'm surely better off simply copying the database of information from my Production MySQL to my Testing MySQL and simply connecting differently within each environment. Since the databases and fields will have the same names, the only difference will be in the Connection Scripts located in the two places, one connecting to localhost, the other connecting to my public domain.

Can't see why that shouldn't work.
If anyone reading this can see a flaw, please let me know.

Thanks. Bye now.

Sign in to reply to this post

yogastudents362523

Originally Said By: yogastudents362523
  Redacting the 5.3 build within WAMP on my Development Machine seems stupid. Won't do it. But MySQL surely works.  



If anyone is listening ... MySQL is still not working on this Development Machine. I have worked my way through the information provided by Office Guy, but I am still getting those packet 6 bytes shorter than expected and mysqlnd cannot connect to MySQL 4.1+ using old authentication error messages.

I have deleted WAMP twice now; downloaded the latest version from their site; and let the installer rebuild everything from scratch.

Still no joy.

I have also done fresh MySQL queries to build up my tables and databases completely from scratch via those queries, using the new MySQL build, rather than simply copying or importing them. Also no joy.

Then ... I thought it might genuinely be that the old password system was being used instead of the new one. So I decided to test the length of the password. I ran the following query:

SELECT Length(Password), Substring(Password, 1, 1) FROM mysql.user WHERE user=yogastudents362523. This produced a length of 40. Since my original password was only 8 characters, that surely means that the password has been properly hashed and stored by MySQL? Why, then, am I getting the message? I have checked the php.ini file over using the information in the referenced articles from OfficeGuy.

The serious advice given on the WAMP site was to use the WAMP option to revert to a previous PHP build ... which seems to me ridiculous.

I'm fresh out of ideas. Maybe if I just shut down the computer and try again tomorrow, everything will be resolved.

Here's hoping.
Bye now.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...