Bug? #1146 - Table 'xxx.xxxxx' doesn't exist

前端 未结 18 1721
春和景丽
春和景丽 2020-11-29 05:49

I am using windows XP. I am creating a table in phpMyAdmin using its built-in create table feature, my database name is ffffd.

It generates the following

相关标签:
18条回答
  • 2020-11-29 06:35

    Column names must be unique in the table. You cannot have two columns named asd in the same table.

    0 讨论(0)
  • 2020-11-29 06:36

    run from CMD & %path%=set to mysql/bin

    mysql_upgrade -u user -ppassword

    0 讨论(0)
  • 2020-11-29 06:38

    I encountered the same problem today. I was trying to create a table users, and was prompted that ERROR 1146 (42S02): Table users doesn't exist, which did not make any sense, because I was just trying to create the table!!

    I then tried to drop the table by typing DROP TABLE users, knowing it would fail because it did not exist, and I got an error, saying Unknown table users. After getting this error, I tried to create the table again, and magically, it successfully created the table!

    My intuition is that I probably created this table before and it was not completely cleared somehow. By explicitly saying DROP TABLE I managed to reset the internal state somehow? But that is just my guess.

    In short, try DROP whatever table you are creating, and CREATE it again.

    0 讨论(0)
  • 2020-11-29 06:39

    I also had same problem in past. All had happend after moving database files to new location and after updating mysql server. All tables with InnoDB engine disappeared from my database. I was trying to recreate them, but mysql told me 1146: Table 'xxx' doesn't exist all the time until I had recreated my database and restarted mysql service.

    I think there's a need to read about InnoDB table binaries.

    0 讨论(0)
  • 2020-11-29 06:39

    I had the same problem and can't get a good tip for this over the web, so I shared this for you and for all who needs.

    In my situation I copy a database (all files: frm, myd) to the data folder in MySQL data folder (using Wamp at home). All thing was OK until I want to create a table and have the error #1146 Table '...' doesn't exist!.

    I use Wamp 2.1 with MySQL version 5.5.16.

    My solution:

    1. Export the database to file;

    2. verify if exported file is really OK!!;

    3. drop the database where I have issues;

    4. create a new database with the same name that the last;

    5. import the file to the database.

    FOR ME IS PROBLEM SOLVED. Now I can create tables again without errors.

    0 讨论(0)
  • 2020-11-29 06:39

    In my case, MySQL's parameter; lower_case_table_names was configured = 0.

    It causes queries related with using upper cases will not work.

    0 讨论(0)
提交回复
热议问题