Question
sql_mode=only_full_group_by
I have an ubuntu 18.04 connected with a shared mysql, both fresh installations. Yesterday I transfered the website and everything looked fine so far. This morning I realised that the search function is not working at all on wp-admin. Check the errors and I got this
WordPress database error Expression #10 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'dbname.lt.name' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by for query
Any ideas as the mysql server is shared and I can’t change that.
Thanks
G.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
I did a change in this code and I believe is a little better use of the function setsqlmode:
Solve the Warnings.
Hi @taxworldit
In my case your script doesn’t work. Search stops working again. It seems that the SET SESSION sql_mode = is required.
Thanks,
Giorgos