I'm trying to import a SQL database file which is 750MB by using ssh into my new database. The Sql1043724_1.sql
is already on the server.
When I run this command:
mysql -u u77066539X -p u770665391_db < Sql1043XX_1.sql
I get:
ERROR 2006 (HY000) at line 5262: MySQL server has gone away
Unfortunately, in the /etc/my.cnf file I have max_allowed_packet=16M
and I cannot change it because I don't have a root account. I asked to my hosting provider and they cannot change the value for me.
Is there any other procedure that I can use to solve my problem and import my old database?
Thank you!
The maximum packet size relates to how long a line of SQL can be in the .sql
file. The size of the file itself does not matter.
I have found success with overcoming this problem but I configured both the server and use a command line to use a large packet size. Try this:
mysql -u u77066539X -p --max_allowed_packet=1073741824 u770665391_db < Sql1043XX_1.sql
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.