Home > Database > Mysql Tutorial > How to Change MySQL Time Zone to GMT 1 in phpMyAdmin?

How to Change MySQL Time Zone to GMT 1 in phpMyAdmin?

Susan Sarandon
Release: 2024-11-29 02:00:13
Original
525 people have browsed it

How to Change MySQL Time Zone to GMT 1 in phpMyAdmin?

MySQL Time Zone Adjustment

Q: How do I modify my current UTC timezone to GMT 1 within phpMyAdmin?

A: To change the timezone, follow these steps:

  1. Enter the command SET GLOBAL time_zone = 'GMT 1'; in the phpMyAdmin SQL execution field. This will set the global time zone for all subsequent SQL queries.

Note for Linux Builds:

If you encounter an error message indicating "Unknown or incorrect time zone" (#1298), you may need to perform the following additional steps:

  1. Run the command mysql_tzinfo_to_sql /usr/share/zoneinfo/|mysql -u root mysql -p from the Linux command line.
  2. Provide your MySQL root password.
  3. This command will import time zone definitions from your system into the MySQL database.
  4. Now, re-execute the SET GLOBAL time_zone = 'GMT 1'; command.

The above is the detailed content of How to Change MySQL Time Zone to GMT 1 in phpMyAdmin?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template