This problem may have various origins, some related to not using the right libmysql or the correct gcc to build the mysql native adapter.
The source of the problem may also be related to the fact that your MysQL database is using the old password format while the MySQL version being > 4.1.
In that case, mysql.rb assumes your database is using the new password format.
Either you ugrade your database to use the new password format, either you patch mysql.rb to force use the old format:
@pre_411 assignment in
@pre_411 = true (and comment the change !!!)