Do both. And also create a read only mysql user for all connections that do not need to update the db, which is probably most pages and queries. Then, even if they do get that user name and password, they can't do any damage. Have a seperate user and connection script for those pages/scripts that will update the db.
For both the read-only and the read-write user, also restrict the tables and columns that they can access. Deny all create/alter/drop table and db privileges etc, so that even if someone did hack the username and password they could not do too much damage.
Oh, and have a really good read about .htaccess and how to protect your db connect scripts with the usernames and passwords from being read by anyone who did gain access to the server. That is what laserlight is pointing to when he sez to put the script outside the public file system.