Hi Bruno, I had the same problem using MySQLdb, I solved it by setting up a my.cnf file in /etc the following way:
Log in to OS X using an administrator-level account, open Terminal; cd /usr/local/mysql/support-files/ sudo cp my-huge.cnf /etc/my.cnf and enter your admin password when prompted. I hope this helps you solve the problem. Annet.