Anyway, reported bug means that TeraWurfl cannot connect to database using mysqli library, so the patch allows you to hide warnings in this case, and not to solve the reason of connection problem.
I'd recommend you to patch TeraWurflDatabase_MySQL5.php to log errors:
if(mysqli_connect_errno()){
$this->errors[]=mysqli_connect_error();
$this->connected = mysqli_connect_errno();
/* new */ error_log('TeraWurfl error #'.mysqli_connect_errno().': '.mysqli_connect_error());
return false;
}
And then watch for new messages in error_log.