Hi,
I also got that error (using MySQL 5.0.51a), so deleted the lines referring to mysql_set_charset() ,
$powergallery = mysql_pconnect($hostname_powergallery,
$username_powergallery, $password_powergallery) or trigger_error(mysql_error(),E_USER_ERROR);
?>
at least it let me continue the installation, although I did get a few ascii characters inserted in the image descriptions, I assume it is connected.