简体   繁体   中英

How I can set sql_mode in vitess v6.0.20-20200508

I am using latest vitess v6.0.20-20200508 and MySQL version 5.7. Without updating the MySQL version I want remove "ONLY_FULL_GROUP_BY" from sql_mode. Can anyone please help me? I tried with

SET global sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY,','')); 

in the vttablet, But it is not updating sql_mode. I want to set it while starting sql server. I have also tried in vttablet-up.sh file by adding the

SET global sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY,',''));

But it is still not updating sql_mode. Please help!

Thank You

Setting of global or session variables is not yet supported in vitess. For global, we recommend pre-initializing the database with the necessary settings. This can be done through init_db.sql that vitess uses to initialize the instances it brings up.

Support for setting session variables is what we're working on next. It should be out very soon.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM