When restoring a MySQL database, i get error “MySQL server has gone away”.
# mysql -u root -p'serverok123' sok_wp < backup.sql ERROR 2006 (HY000) at line 5095: MySQL server has gone away #
To fix this, edit MySQL configuration file. Add following line under [mysqld] section.
max_allowed_packet = 256M
Restart MySQL
systemctl restart mysql
If you use MariaDB
systemctl restart mariadb
Related Posts
Leave a Reply