Simple Machines Community Forum

General Community => Scripting Help => Aiheen aloitti: jawohl - lokakuu 06, 2007, 06:08:27 AP

Otsikko: Problems with restoring sql database.. invalid default value
Kirjoitti: jawohl - lokakuu 06, 2007, 06:08:27 AP
Hello!

My former server crashed so I'm moving my forum to a new location. I have installed everething from scratch on the new server and also made a database backup from the old location.

Now I want to restore the database on the new forum. Since my sql-file is too large for phpMyAdmin I'm using Bigdump. I set everything correct but when I try to restore the database I get errors.. they look like this:

Error at the line 947: ) TYPE=MyISAM;

Query: CREATE TABLE `smf1_gallery_report` (
ID int(11) NOT NULL auto_increment,
ID_PICTURE int(11) NOT NULL default '',
ID_MEMBER mediumint(8) unsigned NOT NULL default 0,
comment text,
date int(10) unsigned NOT NULL default 0,
PRIMARY KEY (ID)
) TYPE=MyISAM;

MySQL: Invalid default value for 'ID_PICTURE'


The problem i the default value, if I check in the sql-file I can se that the line says:
ID_PICTURE int(11) NOT NULL default '',

There is no value between the ''
If I try to set '0' instead it seems to work but then BigDump just stops at the next line and the same problem occurs there.

Is there any other way to import a database? My sql-file is only a cpuple of kb's to big for phpmyadmin, can I schrnk it? :)