这篇文章在 2017年07月11日16:53:34 更新了哦~
piwigo做的图床,在升级了MySQL(版本号5.7.13)之后,某一天突然发现点进去相册就提示MySQL error 3065,具体报错如下:
Warning: [mysql error 3065] Expression #1 of ORDER BY clause is not in SELECT list, references column 'pic.piwigo_images.date_available' which is not in SELECT list; this is incompatible with DISTINCT
SELECT DISTINCT(image_id)
FROM piwigo_image_category
INNER JOIN piwigo_images ON id = image_id
WHERE
category_id = 5
去Google搜索一番找到了这么个链接https://github.com/Piwigo/Piwigo/issues/376
找到了解决方案,修改配置文件
vim /etc/my.cnf
在mysqld字段下增加如下一行
sql-mode=""
重启MySQL即可
systemctl restart mysql.service