Typically, since I have several projects going on at once and I have about 8 different instances of OpenEMR that I develop on my local box I do that following:
First step: Make sure that your virtual host is set up correctly.
If you are on a linux machine like Ubuntu, before you sync your code from the git repo into your web root directory (/var/www/html/openemr), create a single file called index.php and put the following code in it"
<?php echo "my virtual host is working correctly" ?>
like so:
When I go to localhost/openemr-test I see the following:
If you don’t see the following, you might want to make sure that you have correctly configured your /etc/apache/sites-available/openemr.conf file.
You also might want to checkout out your /etc/hosts file as well.
The reason why I think your virtual host is not configured correctly is the error you are getting.
Now, if your VH is set up correctly, I always find it easier to create a new database and call it a name like “database_delete”, let the install script do what it needs to do, then delete the ‘fake’ database and have the sites/default/sqlconfig.php file point to your desired database.
If you can successfully complete the install script creating a new database with your code, you should be able to easily set up the sqlconfig file to access that database.