encrypt() always gives "NULL" on Red Hat 7.0: [hli@lexus] ~ $ mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 98 to server version: 3.23.29-gamma-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer mysql> select encrypt("hello"); +------------------+ | encrypt("hello") | +------------------+ | NULL | +------------------+ 1 row in set (0.00 sec) mysql> select encrypt("hello",1234); +-----------------------+ | encrypt("hello",1234) | +-----------------------+ | NULL | +-----------------------+ 1 row in set (0.00 sec) I am using Red Hat 7.0's updated mysql-3.23.29-1 and glibc-2.2-9. According to http://www.mysql.com/documentation/mysql/commented/manual.php?section=Miscellaneous_functions "If crypt() is not available on your system, ENCRYPT() always returns NULL.". So I suspect that this is glibc's problem. Before I upgraded to RH70 I was running mysql-3.22.32 with glibc-2.1.3 (both compiled myself), and encrypt definitely worked. Now with glibc-2.2 even if I pull out the same /usb/bin/mysql executable from mysql-3.22.32 encrypt gives NULL. I noticed this problem because after the upgrade to RH70 my bugzilla broke. The authenticate doesn't work any more and I traced it down to the encrypt() which always give NULL. Any help would be greatly appreciated since it is impossible for me to downgrade glibc, unless I bring up a new box with RH62.
Sorry I gave some incorrect information. Indeed as previous bug report on the same issue encrypt() works in mysql-3.22.32. And switching to PostgreSQL is not always a viable solution for everyone. For example bugzilla users don't have this option since bugzilla is tied to mysql, and Red Hat is unfortunately one of them. BTW I apologize for having posted the duplicate bug report. Somehow my first search for similar bugs didn't turn up anything.
I setup a RedHat 7.0 system from scratch and had bugzilla functioning, but this morning I updated the packages that have been updated since Dec 13, 2000 and the problem described started. It seems like one of the recent updates broke encrypt() in mysql.
*** This bug has been marked as a duplicate of 22649 ***