0

i'm working on server with centOS and i'm trying to import database from another server. While importing from file in phpmyadmin I'm reciving #2006 error 'server has gone'

From the information I found, i need to change max_allowed_packet but the thing is needed to add this line in /etc/my.cnf beacuse this file wasn't have any variables. I cannot find another my.cnf ( tried find /name my.cnf ) but it given me only this file, but when i type show variables in phpmyadmin - i've got plenty of vars with max_allowed_packet at 1mb.

i located my.cnf in /etc/my.cnf and /etc/my.cnf.d/server.cnf and there was no line like max_allowed_packet - so i added it, restarted with service mariadb restart and still this value got 1MB value

what can i do?

WujaBob
  • 9
  • 5
  • Possible duplicate of [MySQL Server has gone away when importing large sql file](http://stackoverflow.com/questions/12425287/mysql-server-has-gone-away-when-importing-large-sql-file) – Daniel W. Aug 19 '16 at 10:17
  • this tread doesn't helped me – WujaBob Aug 19 '16 at 10:31
  • Please show your limits from the `SHOW VARIABLES` and `SHOW GLOBAL VARIABLES` command. – Daniel W. Aug 19 '16 at 10:39
  • show variables `max_allowed_packet 104857600` and show global variables : `max_allowed_packet 104857600` – WujaBob Aug 19 '16 at 10:53
  • also i used [link]http://www.akashif.co.uk/centos/mysql-my-cnf-not-found-centos[/link] and edited this var to 200MB and then restarted server . but still this same values. – WujaBob Aug 19 '16 at 10:55

1 Answers1

0

Solution which worked for me was log with ssh to mysql and there run sql script " set global max_allowed_packet " to 3344558823 . restart db by "services mariadb restart"

WujaBob
  • 9
  • 5