Well, the database is created under the runas user. And only this user has write permission to this file.
So if you change the runas user, it can’t access the database. Thus you get the error.
You generally shouldn’t change the runas user. If you still have to, delete the database file and let it create a new one.