Can you describe what steps you have taken and which step causes the error?
You can't perform a Flarum install a second time on an existing database with the same prefix. If the database contains old tables you don't need anymore, you can delete the tables and start a new fresh install. If you want to re-use an existing Flarum database, you have to manually create the config.php file with the database credentials.