I've been working on a data query that will select a record from a table using the parameters given.
It's been working perfectly when it is used in localhost but it throws an error when uploaded and used in production site.
Please look at the error
exception 'CDbException' with message 'CDbCommand failed to execute the SQL
statement: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away.
The SQL statement executed was: SELECT id from MST_PERSON WHERE last_name =
'name' and first_name = 'name' and middle_name = 'name' and
birth_date = 'date' limit 1 '
I have tried increasing the wait_timeout of sql but no luck.
Thanks in advance.
Edit your my.cnf
.. In case of linux you need to use : vim /etc/mysql/my.cnf
add:
max_allowed_packet=500M
and restart mysql
I saw the problem in google , it said change my.cnf wait_timeout=28800