Asked 2 years ago
11 Feb 2022
Views 385
jignesh

jignesh posted

MySQL Keeps Crashing

A Database Error Occurred

Error Number: 2006

MySQL server has gone away

SELECT * FROM `users` WHERE `id` = '2'

Filename: models/Auth_model.php

Line Number: 450
angeo

angeo
answered Feb 11 '22 00:00



first of all restart MySQL server

sudo mysqld restart


try to resize the allowed packet to 1 gb
--max-allowed-packet=1G

and try to resize the log file as well to 16 mb
--innodb-log-file-size=16M
run following code to terminal

sudo mysqld --innodb-log-file-size=16M --max-allowed-packet=1G
Post Answer