hi everybody, its me again...
my question today is: is it possible to remove the DB-table Prefix i defined while i installed Drupal??
i tryed to setup some different plugins to work with but often i recieve a lot of cryptical mysql errors...
so i thought that is my predifined table prefix what make me so much trouble... many modules
cant work with table prefix´s so i wanna gave the db-tables there standard names back... without delete them or
a new installation (i am prepared to rename they manually :) but who in the installation is the table prefix defined
??? is it only in the settings.php? or are there other files which contain the table prefix.??? could the site works on fine after deleting the prefix (and renaming the database tables to there original names)???? please
help me!
thank you for future help...
regards
scupone himself.
Comments
recipe
First of all, you should make backup of your database (so you can revert your changes if something goes wrong).
It's good idea to put your site off-line for maintenance (as privileged user), and logout.
Next you have to make changes in YOUR_DRUPAL_FOLDER/sites/default/settings.php and comment and set db_prefix to:
$db_prefix = '';And now ...
You have to rename all tables with prefix from your database.
You can do it from mysql client (
RENAME TABLE tbl_name_with_prefix TO tbl_name_without prefix;), phpmyadmin or whatever.Go to http://yoursite/?q=user and login as privileged user, and turn site online.
NOTICE - Turning site off-line/on-line:
* Drupal 4: administer » settings (admin/settings)
* Drupal 5: Administer » Site configuration » Site maintenance (admin/settings/site-maintenance).
Also, take look at http://drupal.org/node/56995
But, remember, first of all things, make full backup!!!
---
Drupal Themes Live Preview - themegarden.org
yeah that is the answer i still hoped to hear.....
hi again...
cool, thanx for ya rapid support.... i will do a backup first then i wil try
your solution... once again thank you!!
best regards
scupone
www.chromeburner.de
www.keep-it-real-radio.de
www.scupone.de
Duplicate entry errors after prefix modification
Thanks for the recipe, but after I added prefix "drupal_cn_" to all my tables in the database (before I was using no prefix), the website displays without problem, but when creating any new node, I got three errors:
And I'm using Drupal 5.1, any idea what's the problem?
Solution
I found out a possible reason and solution for that.
Seems besides changing all the prefix of tables in your database, you have to take care of the "
sequences" table as well. All the records under the field "name" in this table should also be updated according to the changed prefix.