A
A
amorphine2016-09-10 11:17:31
PHP
amorphine, 2016-09-10 11:17:31

Will downgrading MySQL solve problems after upgrading Ubuntu from 14.04 to 16.04?

On localhost, before the update, I kept several projects on laravel/october and one project with Wordpress. After updating to 16.04, errors from MySQL began to pour in often, most of which are related to the missing default value for any columns or complaints about exceeding the size of inserted values. These errors were not very annoying, since they were fixed manually in phpmyadmin, but today I encountered the following:

Expression #45 of SELECT list is not in GROUP BY clause and contains nonaggregated column 
'digitec.product_description.language_id' which is not functionally dependent on columns in GROUP BY clause; 
this is incompatible with sql_mode=only_full_group_by Query: "SELECT product.*, product_description.*, 
product_to_category.*, product_image.image_json, product_image.image_fotogallery, pyb.nb_visits as 
yandex_bot_nb_visits, pyb.nb_hits as yandex_bot_nb_hits, pyb.sum_daily_nb_uniq_visitors as 
yandex_bot_sum_daily_nb_uniq_visitors FROM product JOIN product_description ON 
product.product_id=product_description.product_id JOIN product_to_category ON 
product.product_id=product_to_category.product_id JOIN category ON 
product_to_category.category_id=category.category_id LEFT JOIN product_image ON 
product.product_id=product_image.product_id LEFT JOIN product_rating ON 
product.product_id=product_rating.product_id LEFT JOIN product_yandex_bot pyb ON 
product.product_id=pyb.product_id WHERE new=1 GROUP BY `product_to_category`.`product_id` ORDER BY 
`date_added` DESC LIMIT 300"

and other variations.
Moreover, this is the last error that remained unresolved after the update. Do you think this is related to mysql implementation in ubuntu 16.06? The options that the matter is in php disappear, because after the upgrade, a downgrade was immediately made from version 7 to 5.6.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nikita, 2016-11-25
@MoNSTRiKcom

ANY_VALUE() - Suppress ONLY_FULL_GROUP_BY value rejection
dev.mysql.com/doc/refman/5.7/en/miscellaneous-func...

mysql> SELECT name, MAX(age) FROM t;
ERROR 1140 (42000): In aggregated query without GROUP BY, expression
#1 of SELECT list contains nonaggregated column 'mydb.t.name'; this
is incompatible with sql_mode=only_full_group_by

SELECT ANY_VALUE(name), MAX(age) FROM t;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question