0

I have a website based on drupal and I tried to export its database via both Backup wizard and phpmyadmin. the database was exported but I can't import it on my localhost database.this the error

Error

SQL query:

INSERT INTO cache_form (cid, data, expire, created, serialized) VALUES ('form_form-oXe_wKiLXaY4CMmjjZfsXJfVqJagaRk2_6Ty33MDJXI', 0x613a34343a7b733a31353a22236e6f64655f656469745f666f726d223b623a313b733a31313a222361747472696275746573223b613a313a7b733a353a22636c617373223b613a323a7b693a303b733a393a226e6f64652d666f726d223b693a313b733a32393a226e6f64652d6d61617265665f67686f72616e5f73617965722d666f726d223b7d7d733a333a226e6964223b613a323a7b733a353a222374797065223b733a353a2276616c7565223b733a363a222376616c7565223b733a333a22313033223b7d733a333a22766964223b613a323a7b733a353a222374797065223b733a353a2276616c7565223b733a363a222376616c7565223b733a333a22313033223b7d733a333a22756964223b613a323a7b733a353a222374797065223b733a353a2276616c7565223b733a363a222376616c7565223b733a313a2231223b7d733a373a2263726561746564223b613a323a7b733a353a222374797065223b733a353a2276616c7565223b733a363a222376616c7565223b733a31303a2231333835303231363438223b7d733a343a2274797065223b613a323a7b733a353a222374797065223b73[...]

MySQL said: Documentation

2006 - MySQL server has gone away

the database works well on remote server, the website works but I can't import it on localhost.

thanks

asked Jan 11, 2014 at 15:17
1
  • Can you please share the full error message. " MySQL server has gone away" usually comes when your mysql server is not available Commented Jan 12, 2014 at 16:09

2 Answers 2

0

I've see at least two problems: 1. fields list doesn't match values. 2. serialized data doesn't quoted properly.

May be you have try native mysqldump instead of "Backup wizard"?

mysqldump \
-u USERNAME -pPASSWORD \
--opt \
--no-create-db \
--comments \
--complete-insert \
--order-by-primary \
DATABASENAME > ./dbdump.sql

Keep in mind that there is no space between -p and PASSWORD.

answered Jan 12, 2014 at 5:32
0

I solved the problem this way: set max_allowed_packet = 4M to the file my.ini

answered Jan 17, 2014 at 5:54

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.