MySQL time zone error problem and Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre

The first question: The server time zone value'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone....

solution:

1. Use cmd command to query time_zone and give him +8:00

1. First enter cmd and then mysql (the instructions to enter mysql are not mentioned)

2. Enter show variables like'%time_zone%';

3. Enter set global time_zone='+8:00';

The effect chart is as follows:

Second, add a default-time-zone ='+8:00' to the my.ini configuration file in mysql

Then restart mysql and you're done~ The command mode can be used without restarting

Tip: The way to modify the configuration file needs to be placed under [mysqld], otherwise it is invalid!

————————————————————————————————————————————————————————

The second question: Expression #2 of SELECT list is not in GROUP BY clause and contains
nonaggregated column ‘sss.month_id’ which is not functionally 
dependent on columns in GROUP BY clause; this is incompatible with 
sql_mode=only_full_group_by
 

I tried many command methods before, but they didn't work very well. Finally, I watched the blog and modified the configuration file by myself.

The method is: find the my.ini configuration file in the mysql file, add at the end of the configuration file

[mysqld]
sql_mode=NO_AUTO_VALUE_ON_ZERO,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE

Then restart the mysql service~

Intelligent Recommendation

mysql reports an error when using GROUP BY to group: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggre

the reason MySQL 5.7.5 and above functions depend on the detection function. If ONLY_FULL_GROUP_BY is enabled SQL mode (by default), MySQL will reject the select list, HAVING condition or ORDER BY lis...

Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre

table of Contents Solution Why is the ONLY_FULL_GROUP_BY limit set by default? Advanced discussion   Original link: https://blog.csdn.net/hq091117/article/details/79065199 https://blog.csdn.net/a...

Observed EXPRESSION # 1 of SELECT LIST IS NOT IN GROUP BY CLAUSE AND CONTAINS NONAGGRE

Used in group by, but reported the following error: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘sss.month_id’ which is not functionally depend...

MySQL has Expression # 2 of SELECT list is not in GROUP BY clause and contains nonaggre error

1. The cause of the problem Before MySQL is 5.7, the ONLY_FULL_GROUP_BY SQL mode will be enabled by default. MySQL will reject select lists, HAVING conditions or ORDER BY list query references in the ...

ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre

MYSQL execute Problems encountered: ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘date.chat.u_ano’ which is not functionally...

More Recommendation

Solve Expression # 1 of SELECT list is not in GROUP BY clause and contains nonaggre pitted all the way, including mysql startup problems

Error log: [Err] 1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'hema_app.a.iid' which is not functionally dependent on columns in GROUP BY clause; thi...

Mysql encountered a pit: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre

Mysql encountered the pit: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre Question: ERROR 1055 (42000): Expression #7 of SELECT list is not in GROUP BY clause and contain...

Mysql5.7 meets the problem of Expression # 1 of SELECT list is not in GROUP BY clause and contains nonaggre

Mysql5.7 meets the problem of Expression # 1 of SELECT list is not in GROUP BY clause and contains nonaggre solution 1. First check if there is only_full_group_by 2. If yes, use the following statemen...

MySQL reported Epression # 1 of SELECT list is not a problem in GROUP BY clause and contains nonaggre of

MySQL reported Epression # 1 of SELECT list is not a problem in GROUP BY clause and contains nonaggre of After executing SQL, reported the following errors: Cause of the problem: MySQL 5.7.5 and more ...

Mysql error Expression #1 of SELECT list is not in GROUP BY clause and contains non

The project is running well. After changing the database server, I reported this error. version reason Recording solution If the permissions are not enough Give users permission Or use the tool to cha...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top