Re: MySQL 5.7 and SQL Mode

2017-04-12 Thread Wido den Hollander
> Op 12 april 2017 om 10:39 schreef Erik Weber : > > > Instead of hacking mysql settings, wouldn't it be better to fix the query? > I agree completely. But CloudStack does a lot of SQL queries and I can't tell for sure which still work or which do not. For now I suggest to change MySQL back

Re: MySQL 5.7 and SQL Mode

2017-04-12 Thread Erik Weber
Instead of hacking mysql settings, wouldn't it be better to fix the query? -- Erik On Wed, Apr 12, 2017 at 9:56 AM, Wido den Hollander wrote: > >> Op 12 april 2017 om 7:23 schreef Koushik Das : >> >> >> Hi Wido, >> >> Check initDataSource() in TransactionLegacy.java. The connection properties

Re: MySQL 5.7 and SQL Mode

2017-04-12 Thread Wido den Hollander
> Op 12 april 2017 om 7:23 schreef Koushik Das : > > > Hi Wido, > > Check initDataSource() in TransactionLegacy.java. The connection properties > are read from db.properties. Thanks! After looking into this I found that you can just add this to db.cloud.url.params sessionVariables=sql_mode=

Re: MySQL 5.7 and SQL Mode

2017-04-11 Thread Koushik Das
Hi Wido, Check initDataSource() in TransactionLegacy.java. The connection properties are read from db.properties. -Koushik On 11/04/17, 10:27 PM, "Wido den Hollander" wrote: > Op 11 april 2017 om 10:51 schreef Rohit Yadav : > > > Hi Wido, > > > You're righ

Re: MySQL 5.7 and SQL Mode

2017-04-11 Thread Wido den Hollander
> Op 11 april 2017 om 10:51 schreef Rohit Yadav : > > > Hi Wido, > > > You're right, MySQL 5.7 has by default strict(er) sql mode enabled. To make > CloudStack work with MySQL 5.7, changing the sql mode makes MySQL 5.7 behave > like 5.6 with which the mgmt server/usage server should work. >

Re: MySQL 5.7 and SQL Mode

2017-04-11 Thread Rohit Yadav
Hi Wido, You're right, MySQL 5.7 has by default strict(er) sql mode enabled. To make CloudStack work with MySQL 5.7, changing the sql mode makes MySQL 5.7 behave like 5.6 with which the mgmt server/usage server should work. Regards. From: Wido den Hollander

Re: MySQL 5.7 and SQL Mode

2017-04-10 Thread Wido den Hollander
> Op 10 april 2017 om 18:20 schreef Rafael Weingärtner > : > > > I noticed this problem on CentOS 7. > It seems that by default the mysql 5.6, comes with sql_mode = "" (at least > in my Ubuntu installation); while on 5.7, it comes with quite some > restrictions. > I set it to the default of 5.6

Re: MySQL 5.7 and SQL Mode

2017-04-10 Thread Wei ZHOU
We had this issue, and made same change as you said. We also add it to chef cookbook. 2017年4月10日星期一,Wido den Hollander 写道: > Hi, > > While testing with Ubuntu 16.04 and CloudStack 4.10 (from master) I've ran > into this error on the management server: > > com.mysql.jdbc.exceptions.jdbc4.MySQLS

Re: MySQL 5.7 and SQL Mode

2017-04-10 Thread Rafael Weingärtner
I noticed this problem on CentOS 7. It seems that by default the mysql 5.6, comes with sql_mode = "" (at least in my Ubuntu installation); while on 5.7, it comes with quite some restrictions. I set it to the default of 5.6, it would be nice though to see if we can improve our SQLs to comply with th

Re: MySQL 5.7 and SQL Mode

2017-04-10 Thread Rene Moser
Hi Wido On 04/10/2017 05:00 PM, Wido den Hollander wrote: > Hi, > > While testing with Ubuntu 16.04 and CloudStack 4.10 (from master) I've ran > into this error on the management server: > > com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #1 of > SELECT list is not in GRO