Configurar Timezone MySQL

Básico MySQL & MariaDB

Configura timezone do MySQL para datas corretas.

O que é
mysql — configura timezone do mysql para datas corretas....
Comando
mysql
Categoria
MySQL & MariaDB
Nível
Básico
📌 Comando: mysql
📁 Categoria: MySQL & MariaDB
👁 Visualizações: 56

Sintaxe

Sintaxe
bash
SET GLOBAL time_zone

Exemplos de Uso

Ver timezone
$ mysql -u root -p -e "SELECT @@global.time_zone;"
Alterar
$ mysql -u root -p -e "SET GLOBAL time_zone = "America/Sao_Paulo";"
Permanente no my.cnf
$ [mysqld] default-time-zone = "America/Sao_Paulo"
Carregar tabelas de timezone
$ mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql

Guia Rápido: mysql

O que é

mysql é um comando Linux usado para configura timezone do mysql para datas corretas..

Para que serve

Configura timezone do MySQL para datas corretas.

Quando usar

Use mysql em tarefas de mysql & mariadb, especialmente em servidores Linux, cPanel, WHM e VPS.

🖥️
Precisa de um VPS com cPanel?
HostSSD oferece VPS NVMe com cPanel/WHM incluído e migração gratuita.
Ver Planos
Copiado!