in reply to Trying to update a mysql table

Are your scripts and the database on the same machine? It could be that your db user account is not allowed remote access, only from 'localhost'.

Cheers
Ben.