How to disable 'only_full_group_by' mode

玉琦 1 Reputation point
2021-11-16T04:59:33.367+00:00

I am actually studying mysql, the mysql running locally can turn off 'only_full_group_by' mode with commands below, how can I turn this mode off on Azure? the same command return that I need root to do this.
MySQL [(none)]> set @@global rajesh .sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER';
ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER privilege(s) for this operation

Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
714 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Saurabh Sharma 23,751 Reputation points Microsoft Employee
    2021-11-16T21:15:37.02+00:00

    Hi @玉琦 ,

    Thanks for using Microsoft Q&A !!
    You need to change the required settings from Azure portal rather than doing through MySQL command. You can modify this property by going to your MySQL instance > Server parameters > look for sql_mode property > you can then select/unselect required property values from the drop down like ONLY_FULL_GROUP_BY, STRICT_TRANS_TABLES etc.
    Please refer to the below image -
    149981-image.png

    Reference documentation - Configure server parameters in Azure Database for MySQL using the Azure portal.

    Please let me know if you have any other questions.

    Thanks
    Saurabh

    ----------

    Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.

    1 person found this answer helpful.