Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying to dump a MYSQL DB on a linux server (Centos 5.2 32bit, MySQL 5.0.45)

In /etc/my.cnf the following value is defined:

[mysqld]
lower_case_table_names=1

When I try and do a dump with mysqldump I get the following error:

[root@linuxbox backups]# mysqldump --user=root --password=secret   --result-file=/tmp/out.sql--all-databases
mysqldump: Got error: 1066: Not unique table/alias: 'foo' when using LOCK TABLES

I can't figure out what I need to do to work around this, and we can't set lower_case_table_names to 0 in my.cnf because that will break some things that require case insensative table names.

How can I do a mysqldump in this situation? (or, another way to make a backup of the DB to file would work since that is the goal)

share|improve this question

1 Answer 1

up vote 5 down vote accepted

Rename one of the conflicting relations.

share|improve this answer
    
Thanks - the DB contained the tables "foo" and "FOO" which obviously is a problem when lower_case_table_names=1. This had gone unnoticed until the dump because it was an unused table. –  DrStalker Jul 14 '09 at 10:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.