Home >Database >Mysql Tutorial >Solution to error when pycharm connects to mysql database

Solution to error when pycharm connects to mysql database

angryTom
angryTomforward
2020-02-06 17:52:234220browse

PyCharm is a powerful Python editor that is cross-platform. If an error occurs when using this tool to connect to the database, how should we solve it?

Solution to error when pycharm connects to mysql database

Solution to the error when pycharm connects to the mysql database

When using the pycharm development tool to connect to the mysql database, an error is prompted. The information is as follows :

Server returns invalid timezone. Go to 'Advanced' tab and set 'serverTimezone' property manually

The prompt message returns invalid timezone. This is due to MySQL's default The time zone is UTC time zone, which is 8 hours behind Beijing time.

The solution is to modify the duration of the mysql time zone. After connecting to mysql, the operation command is as follows:

set global time_zone='+8:00';

(Recommended free learning video tutorial: mysql video tutorial

The above is the detailed content of Solution to error when pycharm connects to mysql database. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:cnblogs.com. If there is any infringement, please contact admin@php.cn delete