I have a mysql DB file of 34Mb size, when i try to import using mysql command, i am getting this error:
mysql -u -p -h < DB.sql
"ERROR 2006 (HY000) at line 491: MySQL server has gone away".
I found in google to change the max_allowed_packet" size in /etc/my.cnf file, even i give the size 1G, same issue repeating. When i try to import same DB on centos 6.6 server, it accepts fine.
Please suggest on this.
in my DB wait_timeout is set to 28800 which is default value, when i update my.cnf file with the variables wait_timeout=6000, i am getting this error while going to mysql prompt.
I have update these variables under both [mysqld] and [mysqld_safe] in /etc/my.cnf, i am able to run the command mysql, but unable to import the DB file which is of 34Mb.
I am able to import the same .sql in other centos 6 machine, i checked tail -f .sql file. it is the output:
/*!40101 SET SQL_MODE=@OLD_SQL_MODE /;
/!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS /;
/!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS /;
/!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT /;
/!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS /;
/!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION /;
/!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;