I am getting an error in mysql
Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'returntr_prod.tbl_customer_pod_uploads.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
for which I found that I need to change the sql mode using
SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
I have executed the above in the mysql terminal and after executing this it is suggested to restart the mysql service. So I have come out of mysql terminal to ubuntu terminal and tried to execute
sudo restart mysql
I get an error message sudo: restart: command not found. Can someone help me understand why am I getting this error.
SET GLOBALto change that option. In fact, it will make your change revert to whatever is set in/etc/my.cnf./etc/my.cnf, those changes won't take effect until you restart the mysqld server. Maybe that's what you read about. The settings in/etc/my.cnfare read only at startup. Then subsequently, you can change the settings withSET GLOBAL(most options can be changed dynamically, but not all). Then the next time you restart, any of those changes you made withSET GLOBALare "lost" because the restart will read/etc/my.cnfagain at startup.SET GLOBALand also edit the/etc/my.cnfto the same value for the respective option, so the next restart will restore the desired setting.