By felipebm on
Hi,
I'm trying to migrate to Drupal and I'm having too much trouble trying to set the prefix on all the Drupal's tables. In the settings.php I wrote:
$db_prefix = 'drupal_';
then I upload it to the sites/default folder.
In the SQL tab of my database in the MyPhpAdmin I upload the local copy of the database.4.1.mysql file.
Note: I haven't been able to include the remote file.
altough I had changed the $db_prefix the tables do not have any prefix at all.
does anybody knows what's happening?
cheers,
Felipe.
Comments
For 4.7 you have to prefix
For 4.7 you have to prefix the tablenames in the SQL file manually, or use the supplied shell script. This has to be done before loading them in to the DB.
---
Work: BioRAFT
For 4.7 you have to prefix
how can I do this?
thanks for your help,
Felipe.
open the mysql file that you
open the mysql file that you are going to use in an editor.
every "CREATE TABLE" and "INSERT INTO" needs to be prefixed.
example:
The above needs to be changed to
note the word prefix_ in the above example. you would have to do this for each table that is to be created prior to importing the db tables. obvioulsy "prefix_" is a place holder for the prefix that you are going to use in settings.php.
so if your prefix is drupal_ then the table to create needs to reflect this.
next an example of the insert
example:
needs to also have your prefix added to it. therefore it needs to read this way before importing in to database.
again, the above example, is assuming, drupal_ is your prefix.
something else...
you also have to edit every "INSERT INTO " command, as an example:
INSERT INTO systemchange it for:
INSERT INTO prefix_systemthanks a lot buddy!!
that is also stated in my
that is also stated in my post at the end. you may have read it before i was finished with the final editing.
no worries, glad you got it sorted.
Sub domain issue - Very Urgent
I have installed drupal on my local machine say http://otg.com:9090 and created a sub domain http://org.otg.com the sub domain has its own $db_prefix(say "org_") but is pointing to the same database instance of main domain.The main domain doesn't have any prefix.Now the problem is when i type http://otg.org.com a new drupal site will open and i have created a new account say "test"/"test".Now my subdomain is ready for customization.But when i logout and login it is simply showing the same page and is not accepting my login information.Could any body Pls help me in this issue.
I am using
PHP 5.0
Apache 2.x
Drupal 4.7
Regards,
Nagarajan.L
http://drupal.org/node/2622
http://drupal.org/node/2622