Hi All

What is the procedure if i want to change my drupal database name and also change the prefix ? can someone please explain it in details ?

Also which one of the two is more safe to do ?

Thanks

Comments

bartmcpherson’s picture

Has the database already been altered to have the new names?

The sites/default/settings.php file contains the db connection information.

$databases = array (
  'default' =>
  array (
    'default' =>
    array (
      'database' => 'NEW_DB_NAME',
      'username' => 'dbuser',
      'password' => 'dbpasswd',
      'host' => 'localhost',
      'port' => '',
      'driver' => 'mysql',
      'prefix' => 'NEWPREFIX',
    ),
  ),
);
amedjones’s picture

thanks I will give that a try.

Is that all that I have to do ? how do I rename my tables?

Currently i am upgrade my site from drupal 5 to drupal 6 ...I know im soo out dated :( . all my tables are named with the prefix drupal5_ I want to remove this prefix and just have drupal_

bartmcpherson’s picture