4
On windows sometimes extra work to make files writable. Of course check that the box titled "Read Only" is unchecked. Then look in your built in users and see if you see an IUSR account. Make sure that account has write permissions of mainfile.php.
Double check that the user of the MySQL database has full permissions to the database.
HTH.