hi
I have created a web using Drupal..now my problem is that when i move my website to another computer, I get an error with regard to my database...
I exported my database into text file and when i try to import it, it shows an error...
If anybody can give me a solution with regard to how I am suppose to move my database?

Comments

Anonymous’s picture

Can you be more specific about your error?

darla85’s picture

hi
basically my problem is while transferring the Drupal website to another computer, I need to export my database....
I want help from anyone who knows how they have moved their Drupal web from one computer to another... because the problem is usually with the database...

SriVani’s picture

hi,

you can take a backup of database in one computer.
create a new database in new computer and restore the old database into new database.
you can check mysqldump commands to take backup and restore database.

stackpool’s picture

Your web host might create prefixes for the tables in your MySQL database, which could confound the settings in settings.php ... I just used a text editor to strip out the old prefixes and insert new prefixes. HiEditor is very fast and capable of editing enormous database files. Worked like a charm.

Also ... you might want to check that your database file isn't corrupt or incomplete. If you're exporting and importing using phpmyadmin, be sure not to export the seriously large but non-essential tables like accesslog, watchdog, cache and sessions. You don't need to empty/truncate them; just uncheck them in the list of tables to be downloaded. These tables not only bloat the database backup; they can completely screw up the export/download process (at least they do with my host!)

As long as you just download the essential bits of your database you shouldn't have a problem porting it over to another server.

dageshi’s picture

I do this quite regularly. If you have access to the commandline on the two machines then you can do this

mysqldump -u [username] --password=[password] [database_name] > /path/to/where/you/want/to/dump/database

this generates a big text file with your database in, copy it to the new machine then do the following

mysql -u [username] -p -D [database_name] < database_dump_file

this will import the database into the new server

hope that helps.

WorldFallz’s picture

I reverted the post back to the original-- please don't abuse edit privileges and make posts nonsensical. Changing the post to "***" makes the comments meaningless. Thanks.

darla85’s picture

hi
i thought i had low capacity database but when it showed database too large, i got confused!need help...