Interesting your gallery is not closed though
Make sure your config settings are right as that error is when the database settings are not right.
Step 3 is not running on your install but I cant explain why other than the query is failing. You run that more than once.
Try this file rename to php as its just that last query