ERROR 2006 (HY000) at line 348: MySQL server has gone away

When i try to restore a MySQL database, i get following error.

To fix the error, edit file

Add

Restart MySQL

if using mariadb, run

MySQL