I tried to set the timezone tables in the MySql database locally and I'm not being able to do it.
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysqldb
The output of the command was the following ones:
Enter password: Warning: Unable to load '/usr/share/zoneinfo/+VERSION' as time zone. Skipping it.
ERROR 1146 (42S02) at line 1: Table 'mysqldb.time_zone' doesn't exist
user:folser user$
Do you know what may be happening?
To explicitly specify the system time zone for MySQL Server at startup, set the TZ environment variable before you start mysqld. If you start the server using mysqld_safe, its --timezone option provides another way to set the system time zone. The permissible values for TZ and --timezone are system dependent.
By default, the time zone for a MySQL DB instance is Universal Time Coordinated (UTC). You can set the time zone for your DB instance to the local time zone for your application instead.
You can set the time zone for the server with the --timezone= timezone_name option to mysqld_safe. You can also set it by setting the TZ environment variable before you start mysqld. The permissible values for --timezone or TZ are system dependent.
The name of the database containing the time zone tables is mysql
, not mysqldb
.
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With