CoolComputing Logo
Coupons/Deals  ·  New Promo Codes/Coupons  · November 15, 2018

Warning: mysql_connect() system error: 32 Fix

Posted on Friday, April 1, 2011 @ 08:53:03 PM CDT by David Yee [] [read 4152 times]

 
PHP Tips and Code Examples
I have a PHP script that is executed by cron on one of our Linux servers. As part of its task, the script will run some queries from local MySQL database. But lately I've been seeing this error message (which is emailed to me) from the script:

Warning: mysql_connect(): Lost connection to MySQL server at 'sending authentication information', system error: 32 in /php/my-php-script.php

It's baffling because I don't get the error message all the time, just occasionally. When I execute the script from the Linux command line, it runs, no problem, no error message.

The odd thing was that I started to get this problem after I had ran upgraded the MySQL passwords on all my servers from the old 16 byte to 41 bytes, and yet only this one particular server was giving me this oddball Mysql system error 32 message. It turned out that I had forgotten to upgrade this one, and in the /etc/my.cnf file I had already commented out:

old_passwords=1

The way you can tell if you still have the old 16 byte passwords is with this query:

SELECT user, LENGTH(password) FROM mysql.user;

If the LENGTH(password) is 16, then you have the old pre-MySQL 4.1 passwords.

After I upgraded the passwords on the mysql user tables for this server I did not have any more of these strange MySQL system error 32 problems any longer. Hope this helps someone out there with a similar problem!



Please rate this article or post a brief review of Warning: mysql_connect() system error: 32 Fix or comment on benchmark/performance, features, availability, price or anything else regarding Warning: mysql_connect() system error: 32 Fix. Thanks!

Warning: Mysql_connect() System Error: 32 Fix Rating: 2.8/5 (21 votes cast)

Your Name:
I have read and agreed to the Review Posting Agreement.
Review Title:
Comment/Review: