Hello,

I´m absolutely desperate. I lost 2 days, trying to export my local database and exporting it to my server on internet.

I´ve tried all. Mysqldump, phpmyadmin, mysqladministrator, dba module... but I can´t do that the PhpMyAdmin on the server side imports the DB correctly. The more close that I arrived is to create the tables with all row content, but with small differences in kb size. And obviuosly Drupal doesn´t load (blank page).

In PhpMyAdmin, I have checked this options when exporting:

Structure
Data
Complete Inserts
Extended Inserts

Anyone can help please. Thanks in advance, Simon.

Comments

rivena’s picture

Not that I can really help you technically, but you can help yourself by providing people with your drupal version and maybe a little more technical background. Perhaps details about your local server. :)

Also, deep breath. Those are important too.

Anisa.
------------------------------------------
www.animecards.org

14,702 card scans and counting!
------------------------------------------

bertboerland’s picture

because it should be so simple as making a dump and import that in the other system.

like:
mysqldump -u userid -ppassword databasename > databasefile
now ftp/scp/mail that file to the new host and type
mysql -u userid -ppassword databasename < databasefile

This, I presume didnt work?
--
groets
bertb

--
groets
bert boerland

SimonVlc’s picture

Thank you both for the answers. Yes bertb, I did that and 100 combinations more of the mysqldump parameters, but didn´t work.

I´m capable of restore the database created on the internet server, but Drupal shows a blank page when loaded.

The database restored differs in a small KB from local to server. Is it normal? There are differences too in the mysql local and server (4.1 vs 4.0) but I tried all the compatibility options on mysqldump and phpMyAdmin to do the backups.

It´s very strange because Drupal seems to be registering activity (new log rows in the watchdog file), but it can´t load any page.

If I drop the database, and load the database.mysql of the drupal dir, all works fine, so I think it isn´t a problem with uploaded files.

That´s all. Thank you for hear me.

J Shizzle@poppycocknews.com’s picture

Are you sure that your conf.php is set to the correct database and the database user is set correctly and has the correct permissions? Seems like if you drop the db and upload the database.mysql, then you're having an issue with either the DB being set wrong or the permissions set wrong with the mysql user.

I've had this problem many times, but it's not always just one thing.

Maybe in phpMyAdmin try uploading the database.mysql, making sure it works correctly, then create a completely new DB with a new db user with all permissions granted, and import your backup into that. Change the conf.php file and then you can at least rule the conf.php file out as the problem.

SimonVlc’s picture

Thank you J. I´ll try that tomorrow. It´s one of the things that I didn´t try yet ;).

varr’s picture

I found that when I was attempting to import my database sql file, I got an error relating to the "DEFAULT CHARSET=..." text added to the end of each table section.

It was a little tedious, but I went through the sql file and removed all of them to get it to import correctly.

I tried using the regular expressions capability in Dreamweaver to search and remove but I'm not familiar enough with regular expressions to do it.

If any one is familiar with regular expressions, what is the search string for:

Find all text starting with 'DEFAULT' and ending just before ';'

That would probably be big help to a lot of other people as well.

Good Luck
-Varr

SimonVlc’s picture

Thx varr,

the DEFAULT CHARSET is a compatibility problem between mysql 4.0 and 4.1, I think. If you export the database in mode v4.0, the PhpMyAdmin p.e., doesn´t add that line.

You can remove the line without regex too. Open wordpad, select the line and 'replace all' it for nothing. I assume that all lines are the same. If not, tell me and tomorrow can give you a regex.

Bye!

varr’s picture

Not all, but some of them are different. But you're right, I suppose I could have done 3 or 4 search and remove passes and deleted them that way.

But, hey that would have been the easy way. Who wants the easy way, I'm a programmer. My job is to make things complicated. ;-)

-Varr

carly@www.cyberocity.com’s picture

... dropping the database and then importing the file you have trouble with into a new clean db? Maybe a clean db with no tables will accept your sql dump file or export file?

SimonVlc’s picture

After disabling all modules and blocks on my drupal, and exporting/importing the database I´ll get this error instead the blank page... :/

warning: array_keys(): The first argument should be an array in /usr/home/hidrahyl/videosdiarios.com/drupal/includes/menu.inc on line 852.

warning: Wrong parameter count for min() in /usr/home/hidrahyl/videosdiarios.com/drupal/includes/menu.inc on line 852.

warning: array_key_exists(): The second argument should be either an array or an object in /usr/home/hidrahyl/videosdiarios.com/drupal/includes/menu.inc on line 329.

warning: array_key_exists(): The second argument should be either an array or an object in /usr/home/hidrahyl/videosdiarios.com/drupal/includes/menu.inc on line 332.

warning: Cannot modify header information - headers already sent by (output started at /usr/home/hidrahyl/videosdiarios.com/drupal/includes/common.inc:344) in /usr/home/hidrahyl/videosdiarios.com/drupal/includes/common.inc on line 167.

Any help is appreciated. Thanks a lot.

J Shizzle@poppycocknews.com’s picture

I had some serious issues with my modules and with the menu module that comes with 4.5.x . I had to drop that table and recreate it manually using phpMyAdmin (the commands to create the table and rows didn't work at the command prompt for some reason). You should try and create the menu table manually. The values are as follows

field, type, attributes, null, default, extra
mid, int(10), unsigned, no, 0
type, int(10), , no, 0
pid, int(10), unsigned, no, 0
path, varchar(255), , no
title, varchar(255), , no
weight, tinyint(4), , no, 0
description, varchar(255), , no

mid should be set as your primary key.

The headers error from common.inc probably exists because your menu module isn't working correctly. Also, while you don't appear to be having any issues with old modules, you do need to actually remove all old modules from ./modules/. I just moved them all to a different folder (i.e. ./modules_old) so I would remember which ones to download. But even if the module is disabled, you may have problems with any old modules that are in the folder regardless of whether they're enabled.

Let me know if that works.

Jeremy