Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7183565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:00:28+00:00 2026-05-28T18:00:28+00:00

We previously had a database in MySQL. In it, we had a table called

  • 0

We previously had a database in MySQL. In it, we had a table called trace. We’ve long since dropped the entire database and created another one with the same name. Now, we try to re-create the table trace from a backup script and we get table already exists. Even though there are clearly no tables in the new database. If I try to create a table that existed before, I get that error. If I create a random table that never existed then it’s fine.

Here is the code I am using to create the table:

DROP TABLE IF EXISTS `Trace`;
CREATE TABLE `Trace` (
  `TraceKey` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Trace Key',
  `TableName` varchar(100) NOT NULL DEFAULT '' COMMENT 'Table Name',
  `RecordKey` int(10) NOT NULL,
  `Action` varchar(100) NOT NULL DEFAULT '',
  `ActionTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Time Stamp',
  `UserName` varchar(100) NOT NULL DEFAULT '' COMMENT 'UserName',
  PRIMARY KEY (`TraceKey`)
) ENGINE=InnoDB AUTO_INCREMENT=6735 DEFAULT CHARSET=latin1;

Error:

Table 'trace' already exists

We did have about 20 tables (trace was one of many) and there were lots of foreign keys if that helps. But we clearly dropped the DB and recreated it.

UPDATE

For testing, I tried this and it WORKS

CREATE TABLE trace (id INT,data VARCHAR(100));

However, after dropping that table and trying it again like this:

CREATE TABLE Trace (id INT,data VARCHAR(100));

It doesn’t work and I get the trace already exists error.

The difference is upper vs lowercase??

UPDATE 2

It is definitely an uppercase vs lowercase issue. Changing the table name from Trace to trace works even using the old script.

Any ideas on why this is so?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T18:00:31+00:00Added an answer on May 28, 2026 at 6:00 pm

    You might have wrong lower_case_table_names setting set on your MySQL Server. Correct values can be found In MySQL documentation. It states:

    If you are using MySQL on only one platform, you do not normally have to change the lower_case_table_names variable from its default
    value. However, you may encounter difficulties if you want to transfer
    tables between platforms that differ in file system case sensitivity.
    For example, on Unix, you can have two different tables named my_table
    and MY_TABLE, but on Windows these two names are considered identical.
    To avoid data transfer problems arising from lettercase of database or
    table names, you have two options:

    1. Use lower_case_table_names=1 on all systems. The main disadvantage with this is that when you use SHOW TABLES or SHOW
      DATABASES, you do not see the names in their original lettercase.

    2. Use lower_case_table_names=0 on Unix and lower_case_table_names=2 on Windows. This preserves the lettercase of
      database and table names. The disadvantage of this is that you must
      ensure that your statements always refer to your database and table
      names with the correct lettercase on Windows. If you transfer your
      statements to Unix, where lettercase is significant, they do not work
      if the lettercase is incorrect.

      Exception: If you are using InnoDB tables and you are trying to avoid these data transfer problems, you should set
      lower_case_table_names to 1 on all platforms to force names to be
      converted to lowercase.

    If you’re using MySQL on Windows and have lower_case_table_names=0 then you might get this error because table Trace (case-sensitive) does not exist in MySQL but file Trace.frm already exists on file system.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that uses CoreData. I previously had a class named Marker
Previously we had desktop applications but given the fact that accessing the server (either
previously i had custom tableviewcell and was loading from Nib.in that i have specified
I want to define a constant in objective-c. Previously I had the following function:
I'm looking into development standards fro JavaScript. I had previously used Doulgas Crockfords Javascript
Previously, I had a class that wrapped an internal System.Collections.Generic.List<Item> (where Item is a
If this was previously talked about, I'm sorry, I had a hard time searching
Since CS3 doesn't have a web service component, as previous versions had, is there
In a previous job we had a classic ASP application that no one wanted
MySQL is awesome! I am currently involved in a major server migration and previously,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.