cbutler Posted August 19, 2010 Posted August 19, 2010 I'm apparently running into a software version mismatch when trying to access a remote MySQL database on my TCH reseller account. Via cpanel, I've enabled the TCH-based reseller database for "%" access. I'm developing on a Mac Snow Leopard system -- PHP 5.3. The same user/password works fine for my PHP code running in production mode on the TCH website and also on my Mac development system. But I get "OK packet 6 bytes shorter than expected" when I try to access the remote TCH database from my Mac, using the same user/password combo. Web comments suggest software mismatch, but I have no control of the TCH system. phpinfo() hasn't made the problem clear. Can anybody help? I'm trying to let a client with multiple websites use a single instance of his database, instead of replicating it across all his websites. I realize "localhost" is the easy solution, since all my client's websites are on the same TCH reseller account. But my client is growing and will need multiple distinct websites in the future, probably on dedicated servers. Thanks for your consideration, Chris Butler PS: My sympathies to the TCH support crew. It seems "regression testing" is just a mild embarassment now to the developers of PHP, and all bets are off now that Oracle owns MySQL. Quote
TCH-Dick Posted August 20, 2010 Posted August 20, 2010 Please open a ticket to my attention, along with the database name, user, and password. This issue is commonly related to the old style passwords, which we unfortunately can not disable or it would break a lot of sites. Once I have this information I can correct this issue for you. Quote
cbutler Posted August 20, 2010 Author Posted August 20, 2010 Thanks for the prompt reply -- TCH never fails to impress me. Can you give me a rough idea what's involved in the fix? I prefer not to have my client inconvenienced for long, if changing password software requires major changes in my code. I'm developing on a Mac/PHP5.3 system, but I greatly appreciate that TCH hasn't made the jump to PHP 5.3 yet. I still have some clean-up works to make my TCH/PHP 5.2x websites work cleanly under 5.3. Just being cautious here... Chris Quote
TCH-Dick Posted August 20, 2010 Posted August 20, 2010 Sure and the only change will be on the back end. We will simply disable support of the old style passwords(temporarily so we don't break other users sites), then using the current database username and password, we will recreate the password using the new style mysql passwords. Once this is done your local setup will connect as usual with no change on your part and you will be able to properly connect using your external setup. This change is something you can actually run from phpmyadmin, however, since you cant actually disable support for the old style passwords, it would have no affect from your end. Quote
cbutler Posted September 29, 2010 Author Posted September 29, 2010 Dick, I'm now trying to connect from my Mac development system to a MySQL database on philadelphia, and am getting the same error message about old vs new password MySQL authentication. My Mac is running PHP 5.3.2, so I assume my PHP mysql_connect() code is producing the newer longer password hash. I'm guessing the correct solution is to delete my MySQL user and then recreate that user, which should generate the new password hash. I'd prefer to update to the newer MySQL password convention instead of working toward backward compatibility, and will change anything necessary in my PHP framework. FYI, I've added my local IP address to the access list via cPanel, which is how I got as far as the old/new password conundrum. I'm reluctant to offer more specifics in a public forum, but I'd appreciate your input to help me generate a coherent ticket. Thanks, Chris Quote
TCH-Bruce Posted September 29, 2010 Posted September 29, 2010 You should be able to add a new user/password to the database and then delete the original one. Quote
cbutler Posted September 29, 2010 Author Posted September 29, 2010 Bruce... That database has a single user, and I already tried removing and restoring that user. I just repeated that process, and also created a new user/password. In each case, I get this error message: Warning: mysql_connect(): OK packet 6 bytes shorter than expected in /websites/bbm_georgetown/shared_v4/libs/database_lib.php on line 96 Warning: mysql_connect(): mysqlnd cannot connect to MySQL 4.1+ using old authentication in /websites/bbm_georgetown/shared_v4/libs/database_lib.php on line 96 Other suggestions gratefully accepted... Chris Quote
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.