Passwords with U+0027 escaped with backslashes. Eventually these backslashes make it to mysql_connect(), which causes a failure to connect.