MySQL Forums
Forum List  »  Backup

ERROR 1146 (42S02) at line 12: Table 'mysql.time_zone_name' doesn't exis
Posted by: Ravi Thati
Date: January 27, 2011 01:08AM

Hi All,

I am using MySQL 5.0.91 on RHEL4.
I have dumped the mysql system database like this:
$>mysqldump --flush-privileges --single-transaction --flush-logs --master-data=2 --create-options --default-character-set=utf8 --max_allowed_packet=16776192 -u root --socket=/tmp/mysql50.sock 'mysql' >/tmp/mysqldumped1

My Restore steps to the same server:
1)drop database mysql;
2)create database mysql;
3)mysql -u root -p --socket=/tmp/mysql50.sock </tmp/mysqldumped1
And this fails with the error:"ERROR 1146 (42S02) at line 12: Table 'mysql.time_zone_name' doesn't exist".

I have looked at the line 12 in the dump file, it is "/*!40103 SET TIME_ZONE='+00:00' */;".

The same backup and restore operation works fine in 5.4.

After searching for some time.. i have figured out there is one option --tz-utc introduced in 5.1.


If I set the --tz-utc=FALSE whild dump in MySQL 5.0.. the restore does not complain this error and reason seems to be that.. with --tz-utc=FALSE.. it wont dump TIME_ZONE instructions. The dump does not contains the "SET TIME_ZONE" statement.

Now, my question is... should i dump the mysql 5.0 mysql system database with --tz-utc=FALSE for correct backups and restores OR is there a different way to get out of this issue?.


Thanks for understanding the issue.. and thanks for your replies in advance.

--
Ravi

Options: ReplyQuote


Subject
Views
Written By
Posted
ERROR 1146 (42S02) at line 12: Table 'mysql.time_zone_name' doesn't exis
13697
January 27, 2011 01:08AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.