Zen Cart Logo
Forums / Installing on a Linux/Unix Server / 2006 - MySQL server has gone away - Error trying to upload database

2006 - MySQL server has gone away - Error trying to upload database

Locked

Views: 5,530

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
26 Jul 2008, 2:16 PM
#1
sunflowertami avatar

sunflowertami

Zen Follower

Join Date:
Jun 2008
Posts:
267
Plugin Contributions:
0

2006 - MySQL server has gone away - Error trying to upload database

I am trying to upload my database from local host to live site and have followed the instructions on moving databases.

When I try to import the sql file into myphp on my live server, this is the error I get and then the import stops:

SQL query:

CREATE TABLE admin_activity_log (
log_id int( 15 ) NOT NULL AUTO_INCREMENT ,
access_date datetime NOT NULL default '0001-01-01 00:00:00',
admin_id int( 11 ) NOT NULL default '0',
page_accessed varchar( 80 ) COLLATE latin1_general_ci NOT NULL default '',
page_parameters text COLLATE latin1_general_ci,
ip_address varchar( 15 ) COLLATE latin1_general_ci NOT NULL default '',
PRIMARY KEY ( log_id ) ,
KEY idx_page_accessed_zen ( page_accessed ) ,
KEY idx_access_date_zen ( access_date ) ,
KEY idx_ip_zen ( ip_address )
) ENGINE = MYISAM DEFAULT CHARSET = latin1 COLLATE = latin1_general_ci AUTO_INCREMENT =7009;

MySQL said: Documentation
#2006 - MySQL server has gone away

Anybody knows what I should do to??

:shocking:

1 Aug 2008, 5:28 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: 2006 - MySQL server has gone away - Error trying to upload database

You'll find more discussions of the same error message under "Similar Threads" below.

"2006 - MySQL server has gone away" is caused by the MySQL server connection dying while PHP or some other process is still expecting it to be open so it can continue running database commands.

You may have to work with your host to do your database import using another method, or maybe chop your import SQL file into multiple smaller files instead. Or ask your host to increase the SQL connection timeout so you can do your import.