0

VPS Digitalocean Configuration is :

Centos 7 x64
MariaDB

I am getting this error while uploading 380MB database to MariaDB, ERROR 2013 (HY000) at line 1013111: Lost connection to MySQL server during query

I used this command mysql -u root -p123456 --database=testdb < file.sql

How do I get MariaDB to accept this file?

Sami Bekkari
  • 21
  • 1
  • 8

1 Answers1

0

Try running these before your import and then try again:

SET global net_buffer_length=10000000;
SET global max_allowed_packet=1000000000;
SET innodb_flush_log_at_trx_commit = 2;
SET global innodb_io_capacity = 6000;
SET global innodb_thread_concurrency = 0;
SET foreign_key_checks = 0;
SET UNIQUE_CHECKS = 0;
SET AUTOCOMMIT = 0;

These will increase some limits and turn off some processes that run during import. Make sure to restart your sql server afterwards to reset these values. Obviously there are some InnoDB variables in there. You can leave them as is or remove them. If you are not running InnoDB, it wont affect anything.

Side Note: You might want to do a little more searching on SO before posting a question as this is a very common issue and there are many answers and solutions here. That will prevent your questions from getting flagged as duplicate and closed before you can get an answer.

RisingSun
  • 1,693
  • 27
  • 45
  • MariaDB [(none)]> SET global max_allowed_packet=1000000000; Query OK, 0 rows affected, 1 warning (0.00 sec) still same thing bro, ERROR 2013 (HY000) at line 2536584: Lost connection to MySQL server during query – Sami Bekkari Sep 18 '15 at 21:58
  • Check this out http://stackoverflow.com/questions/6516943/lost-connection-to-mysql-server-during-query – RisingSun Sep 18 '15 at 22:27