Clone Site

haovn577 wrote on Tuesday, June 05, 2012:

Hi all,

I have a question about site clone?
I want to have a site same as old site (example: site with my language and structure),
1. I clone my Database that I want its data
2. ->admin.php  -> add new site
3. Setup: I choose "I have already created the database" and do thing necessary.
and I see below, but I can login to my new site??? So what happen? Can you explain to me and introduction new solution?

OpenEMR Setup

Step 3

Configuring OpenEMR…

Creating site directory…OK.
Connecting to MySQL Server… ERROR. Check your login credentials. unable to select database: 'clone2'

Thank and Best Regards,
Hao Tran

bradymiller wrote on Tuesday, June 05, 2012:

Hi Hao,

Are you following these instructions:
http://www.open-emr.org/wiki/index.php/OpenEMR_Multiple_Sites_Module#Installation_of_a_new_site

-brady
OpenEMR

haovn577 wrote on Tuesday, June 05, 2012:

Hi Brady,

I have done, but… error. please pictures below and give me reason :slight_smile:



Thank and Regards,
Hao Tran

yehster wrote on Tuesday, June 05, 2012:

When you are “cloning a site” you don’t really want to run the setup.php scripts.
The option “I have already created the database” really means “I have already created an *EMPTY* database.” Not I already have a database I want to use.

Edit sqlconf.php manually to point the correct database and you should be in business.

haovn577 wrote on Tuesday, June 05, 2012:

Hi yehster,

thank thank you so much, that’s problem.
Now I can solution this problem by my way, create empty database as normal, then copy data from default database to new database ^^.
But I also want to know how to create a site from **database I want to use **
How to do that?
And what is included in sqlconf.php to cloning a site in business(cloning more site).

Regards and Thank for helping
Hao Tran

bradymiller wrote on Wednesday, June 06, 2012:

Hi,

As yehster points out, do not use “I have already created the database” in your case. This is actually a bit confusing, but it is only meant to be used when a user needs to create an empty database first (for example, hosting services don’t give admin sql privileges, so OpenEMR would be unable to create a database during setup).

Note that when you create a new site in multisite, that on Step 2 near bottom is option to Source a site and to clone the database:
http://www.open-emr.org/wiki/index.php/OpenEMR_Multiple_Sites_Module#Installation_of_a_new_site

-brady
OpenEMR

acuherbw wrote on Friday, September 27, 2013:

Hi kevin
how to edit sqlconf.php? it that under new installsite/sqlconf.php ? put you database name and password, dB user name on? I have problem, when I install multisite, I tried to manually put Password and user ID, database name on Sqlconf, but still come out error message? ant help, thanks

yehster wrote on Saturday, September 28, 2013:

Not sure what exactly you are asking.
If userid and password are correct, then either the host is wrong, or the database name isn’t right.
Honestly, I haven’t worked much with the multi-site module.