Writing name of existing database, doesn't use database
At install tool step 2, you are able to write a new database to create or choose a database from a select list.
If you write the name of a already existing database, the name isn't written to localconf.php and the next step will result in a error.
check if written databasename exist in array of existing databases and then write it, if true.
Going to a meeting in 20 minutes, but will try to create patch later tonight!
(issue imported from #M14478)