4
There should be only one /mainfile.php
You have to set the permission to eg 777 for editing or replacing it. When finished, set it again to readonly (444).
It is unclear to me how you come to know, that there is a new user and password for the database. Did your hoster tell you this? Then he probably moved or updated the server.