PDA

View Full Version : [V1.5RC2] Restore problem


tommykjensen
8th of March 2004 (Mon), 10:55
I am trying to copy the database from a windows server to a linux server. I ran the backup and copied the sql file to the linux server.

When I try to import it with mysql I get following error message:

ERROR 2020 at line 13: Got packet bigger than 'Max_Allowed_Packet'

Then I tried running part of the sql via phpMyadmin. I tried this section:


DROP TABLE IF EXISTS `ee_admin`|EE|BACKUP|
CREATE TABLE `ee_admin` (
`ee_admin_id` int(11) NOT NULL auto_increment,
`ee_admin_name` varchar(32) NOT NULL default '',
`ee_admin_pass` varchar(32) NOT NULL default '',
`ee_admin_login` datetime NOT NULL default '2003-01-01 01:01:01',
`ee_admin_logout` datetime NOT NULL default '2003-01-01 01:01:02',
`ee_admin_session_id` varchar(32) NOT NULL default '',
`ee_admin_session_ip` varchar(15) NOT NULL default '',
`ee_admin_session_browser` varchar(255) NOT NULL default '',
PRIMARY KEY (`ee_admin_id`)
) TYPE=MyISAM COMMENT='ee editor user login'|EE|BACKUP|


But this results in following error:

You have an error in your SQL syntax near '| EE | BACKUP | CREATE TABLE `ee_admin` ( `ee_admin_id` int( 11 ) NOT N' at line 1

Pekka
8th of March 2004 (Mon), 13:38
I am trying to copy the database from a windows server to a linux server. I ran the backup and copied the sql file to the linux server.

When I try to import it with mysql I get following error message:

ERROR 2020 at line 13: Got packet bigger than 'Max_Allowed_Packet'


This means one SQL command is bigger than allowed size for it. You'll need to increase max packet size in my.ini.

See http://www.mysql.com/newsletter/2003-08/a0000000216.html

I have a hunch those big commands are in ee_message table (EXIF data). You don't have to restore that table at all, just restore the create table part. You can also back up without ee_message or better still empty all messages before doing backup.

Then I tried running part of the sql via phpMyadmin. I tried this section:


DROP TABLE IF EXISTS `ee_admin`|EE|BACKUP|
CREATE TABLE `ee_admin` (
`ee_admin_id` int(11) NOT NULL auto_increment,
`ee_admin_name` varchar(32) NOT NULL default '',
`ee_admin_pass` varchar(32) NOT NULL default '',
`ee_admin_login` datetime NOT NULL default '2003-01-01 01:01:01',
`ee_admin_logout` datetime NOT NULL default '2003-01-01 01:01:02',
`ee_admin_session_id` varchar(32) NOT NULL default '',
`ee_admin_session_ip` varchar(15) NOT NULL default '',
`ee_admin_session_browser` varchar(255) NOT NULL default '',
PRIMARY KEY (`ee_admin_id`)
) TYPE=MyISAM COMMENT='ee editor user login'|EE|BACKUP|


But this results in following error:

You have an error in your SQL syntax near '| EE | BACKUP | CREATE TABLE `ee_admin` ( `ee_admin_id` int( 11 ) NOT N' at line 1


This is because the delimiter |EE|BACKUP| is EE Backup stuff and not a Mysql command. Use a text editor to replace all |EE|BACKUP| with ; and it should run ok.

tommykjensen
8th of March 2004 (Mon), 13:46
Thanks for clarifying.