My webhost is pretty limited, and I only have one database user & schema. I would like to install multiple drupal installations on this database schema.
How do I tell each installation to prefix its tablenames with a given string?
In the settings.php file, a normal setup might look like
$databases['default']['default'] = array(
'driver' => 'mysql',
'database' => 'databasename',
'username' => 'username',
'password' => 'password',
'host' => 'localhost',
'collation' => 'utf8_general_ci',
);
The only difference is that you add a 'prefix', like this:
$databases['default']['default'] = array(
'driver' => 'mysql',
'database' => 'databasename',
'username' => 'username',
'password' => 'password',
'host' => 'localhost',
'prefix' => 'site1_',
'collation' => 'utf8_general_ci',
);
Make the prefix different in each settings.php site, and you can have as many sites as you want within the same database.