How do I upload the drupal database tables so that they all have a prefix infront of them, so I can have another drupal-powered site? I already have the drupal tables installed with no prefix in front of them for my main site.

Comments

adnanshareef’s picture

you just need the mysql that can load new tables with the prefix of your choice. some scripts are already available on this site to generate a drupal database mysql file with the prefix of your own choice.
after that you just have to load that mysql and set the right prefix in settings.php


Adnan Shareef
Webmaster
Laser Hair Removal Info Guide

B747’s picture

you just need the mysql that can load new tables with the prefix of your choice. some scripts are already available on this site to generate a drupal database mysql file with the prefix of your own choice.

How? Where?

adnanshareef’s picture

I just searched for table prefix at the site and got many solution..

one solution is to Open database.mysql in a text editor, then:

Replace: "CREATE TABLE " (don't forget the space!)
With: "CREATE TABLE prefix_"

Replace: "INSERT INTO "
With: "INSERT INTO prefix_"

Replace: "REPLACE "
With: REPLACE prefix_"

Then edit settings.php and set $db_prefix='prefix_'

the second similar solution can be found at http://drupal.org/node/47994 where a previxed mysql is available and u just have to replace "prefix" with your prefix.

Adnan Shareef
Webmaster
Laser Hair Removal Info Guide