Greetings-
Sorry, it is still a little foggy for me. Is the following steps going to give me a second fully functioning site? A. Change prefixes in the database.mysql file to ba_. B. Import tables into database with PHP My Admin using database.mysql. C. Create sub directory with the settings.php file in sites directory. D. set the $db_prefix in settings.php.
Is this right or is there another way?
Thank you. Regards
----- Original Message ----- From: "Chris Johnson" chris@tinpixel.com To: drupal-support@drupal.org Sent: Wednesday, June 15, 2005 4:40 PM Subject: Re: [drupal-support] multiple sites
Christopher Taylor wrote:
Hello,
If I want to host multiple sites and I change the $db_prefix in a new settings.php file, do I have to re-import tables with the new prefix or does drupal figure it out? What about aded modules and other additions?
If you want to prefix your tables so that you can host multiple site,
avoid
conflict with other existing tables from another application in the same database, or share tables between sites, etc., then you have to rename the database tables yourself to match the prefix values you use in the
$db_prefix
variable. Drupal does not (can not) rename the tables for you.
The method by which you rename the tables depends on your situation and database. In MySQL, you can issue a "RENAME TABLE foo TO bar" statement
to
rename table foo to table bar, for example. So you do not need to
re-import
tables to do prefixing.
Added modules which have added tables will need to have their tables
renamed
as well, *IF* you likewise want to prefix them in $db_prefix, which you probably want to do if you are hosting multiple sites from one database, versus using prefixing for other purposes, e.g. shared tables, avoiding
name
collisions with existing tables, etc.
Hope this helps.
-- Chris Johnson
-- [ Drupal support list | http://lists.drupal.org/ ]