Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The process of configuring the time zone of MySQL database

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "the process of configuring the time zone of MySQL database". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "the process of configuring the time zone of MySQL database".

The time zone configuration process for the MySQL database:

Take 5.6.19 as an example.

Root@ (none) 01:43:17 > show variables like'% time_zone%'

+-+ +

| | Variable_name | Value |

+-+ +

| | system_time_zone | CST |

| | time_zone | SYSTEM |

+-+ +

2 rows in set (0.03 sec)

Now it is based on the system settings.

Root@ (none) 01:46:37 > set time_zone= "+ 8:00"

Query OK, 0 rows affected (0.02 sec)

Root@ (none) 01:46:47 > select now ()

+-+

| | now () |

+-+

| | 2016-04-11 13:46:55 |

+-+

1 row in set (0.02 sec)

Root@ (none) 01:46:55 > show variables like'% time_zone%'

+-+ +

| | Variable_name | Value |

+-+ +

| | system_time_zone | CST |

| | time_zone | + 08:00 |

+-+ +

2 rows in set (0.09 sec)

You can also modify the time zone by modifying the configuration file my.cnf.

Add under file [mysqld]

Default-time-zone='+8:00'

At this point, I believe that everyone on the "MySQL database time zone configuration process" have a deeper understanding, might as well to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report