Номер ошибки 1146

I am using windows XP. I am creating a table in phpMyAdmin using its built-in create table feature, my database name is ddd. It generates the following code: CREATE TABLE `ddd`.`mwrevision` ( ...

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

It generates the following code:

CREATE TABLE  `ddd`.`mwrevision` (

`asd` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`sddd` INT NOT NULL
) ENGINE = INNODB;

and the following error shows up:

MySQL said:     
#1146 - Table 'ddd.mwrevision' doesn't exist 

What might be the problem?

mins's user avatar

mins

5,87611 gold badges52 silver badges72 bronze badges

asked Jun 14, 2011 at 10:29

Shaheer's user avatar

9

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.

Rafael Barros's user avatar

answered Dec 7, 2011 at 4:43

sempasha's user avatar

sempashasempasha

6235 silver badges18 bronze badges

2

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.

Rafael Barros's user avatar

answered Jan 24, 2012 at 6:30

carlos's user avatar

carloscarlos

1111 silver badge2 bronze badges

1

Restarting MySQL works fine for me.

answered Nov 2, 2014 at 18:24

Muhammad Usman's user avatar

Muhammad UsmanMuhammad Usman

10.2k22 gold badges72 silver badges107 bronze badges

0

In my case I ran this command even if the table wasn’t visible in PhpMyAdmin :

DROP TABLE mytable

then

CREATE TABLE....

Worked for me !

answered May 21, 2015 at 9:22

Jim 007's user avatar

Jim 007Jim 007

2201 gold badge3 silver badges8 bronze badges

1

Check filenames.

You might need to create a new database in phpmyadmin that matches the database you’re trying to import.

Mayur Birari's user avatar

Mayur Birari

5,8278 gold badges33 silver badges61 bronze badges

answered Nov 21, 2012 at 15:23

blarg's user avatar

blargblarg

3,72310 gold badges40 silver badges69 bronze badges

2

I had the same problem. I tried to create a table in mysql and got the same error. I restarted mysql server and ran the command and was able to create/migrate table after restating.

answered May 10, 2013 at 11:10

thekosmix's user avatar

thekosmixthekosmix

1,68521 silver badges33 bronze badges

Today i was facing same problem. I was in very difficult situation but what id did i create a table with diffrent name e.g (modulemaster was not creating then i create modulemaster1) and after creating table i just do the rename table.

answered Jun 12, 2013 at 11:57

Vipin Gurjar's user avatar

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.

answered Apr 6, 2015 at 17:51

Xin's user avatar

XinXin

4,2124 gold badges18 silver badges15 bronze badges

As pprakash mentions above, copying the table.frm files AND the ibdata1 file was what worked for me.

In short:

  1. Shut your DB explorer client (e.g. Workbench).
  2. Stop the MySQL service (Windows host).
  3. Make a safe copy of virtually everything!
  4. Save a copy of the table file(s) (eg mytable.frm) to the schema data folder (e.g. MySQL Server/data/{yourschema}).
  5. Save a copy of the ibdata1 file to the data folder (i.e., MySQL Server/data).
  6. Restart the MySQL service.
  7. Check that the tables are now accessible, queryable, etc. in your DB explorer client.

After that, all was well. (Don’t forget to backup if you have success!)

Community's user avatar

answered Aug 17, 2016 at 23:46

SteveCinq's user avatar

SteveCinqSteveCinq

1,8901 gold badge16 silver badges22 bronze badges

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

answered Jun 14, 2011 at 10:32

Oswald's user avatar

OswaldOswald

30.9k3 gold badges43 silver badges68 bronze badges

8

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

mysql_upgrade -u user -ppassword

answered Jun 14, 2011 at 11:04

Ravi Parekh's user avatar

Ravi ParekhRavi Parekh

4,9489 gold badges43 silver badges57 bronze badges

2

Recently I had same problem, but on Linux Server. Database was crashed, and I recovered it from backup, based on simply copying /var/lib/mysql/* (analog mysql DATA folder in wamp). After recovery I had to create new table and got mysql error #1146. I tried to restart mysql, and it said it could not start. I checked mysql logs, and found that mysql simply had no access rigths to its DB files. I checked owner info of /var/lib/mysql/*, and got 'myuser:myuser' (myuser is me). But it should be 'mysql:adm' (so is own developer machine), so I changed owner to ‘mysql:adm’. And after this mysql started normally, and I could create tables, or do any other operations.

So after moving database files or restoring from backups check access rigths for mysql.

Hope this helps…

thvwns's user avatar

thvwns

3,5383 gold badges43 silver badges57 bronze badges

answered Aug 23, 2013 at 8:32

vlad's user avatar

The reason I was facing this was because I had two «models.py» files which contained slightly different fields.
I resolved it by:

  1. deleting one of the models.py files
  2. correcting references to the deleted file
  3. then running manage.py syncdb

answered Nov 11, 2013 at 7:02

Amey's user avatar

I got this issue after copying mytable.idb table file from another location. To fix this problem I did the following:

ALTER TABLE mydatabase.mytable DISCARD TABLESPACE;

Copy mytable.idb

ALTER TABLE mydatabase.mytable IMPORT TABLESPACE;

Restart MySql

answered Apr 13, 2014 at 20:34

l0pan's user avatar

l0panl0pan

4667 silver badges11 bronze badges

1

I had the same issue. It happened after windows start up error, it seems some files got corrupted due to this. I did import the DB again from the saved script and it works fine.

answered Oct 31, 2014 at 22:51

Ayman Al-Absi's user avatar

I had this problem because of a trigger not working..Worked after I deleted the trigger.

answered Aug 2, 2016 at 12:21

DauleDK's user avatar

DauleDKDauleDK

2,9297 gold badges51 silver badges90 bronze badges

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

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

answered Aug 9, 2017 at 6:25

hiropon's user avatar

hiroponhiropon

1,6152 gold badges18 silver badges41 bronze badges

For me it was a table name upper/lower case issue. I had to make sure that table case name matched in a delete query, table notifications was not the same as Notifications. I fixed it by matching table name case with query and what MySQLWorkbench reported.

What is wierd is that this error showed up in a worked sql statement. Don’t know what caused this case sensitivity. Perhaps an auto AWS RDS update.

answered Mar 16, 2018 at 15:43

Kahitarich's user avatar

KahitarichKahitarich

3752 silver badges7 bronze badges

if you are modifying mysql bin->data dir’s and after that, your database import will not works

so you need to close wamp and after that start wamp

now database import will work fine

answered Jan 15, 2021 at 19:03

Hassan Saeed's user avatar

Hassan SaeedHassan Saeed

5,8711 gold badge33 silver badges37 bronze badges

Make sure you do not have a trigger that is trying to do something with the table mentioned in the error. I was receiving Error Code: 1146. Table 'exampledb.sys_diagnotics' doesn't exist on insert queries to another table in my production database. I exported the table schemas of my production database then searched for instances of exampledb.sys_diagnotics the schema SQL and found a debugging insert statement I had added to a table trigger in my development environment but this debug statement had been copied to production. The exampledb.sys_diagnotics table was not present on my production database. The error was resolved by removing the debug statement in my table trigger.

answered May 4, 2022 at 19:33

w. Patrick Gale's user avatar

Стр.: 1

Надо войти или зарегиться

1 16.09.2012 01:33

  • selenii
  • Чув-а-а-а-к!!!
  • Карма: 0 / 0

Тема: Ошибка MySQL Error 1146 в базе данных DLE

Всем Привет Ребята,
у меня тут проблемка появилась, нужна ваша помощь.

Ошибочка появилась в движке вот такая:

MySQL Error! 
------------------------

The Error returned was: 
Table 'filmlive_kinobase.dle_post_extras' doesn't exist 

Error Number: 
1146 

Что подскажете сделать.

Спасибо заранее!

2 Kanra 16.09.2012 09:24 (16.09.2012 09:25 отредактировано Kanra)

  • Kanra
  • Adsumus! Adsumus!
  • Карма: 25 / 0

Re: Ошибка MySQL Error 1146 в базе данных DLE

Ну это же элементарно Ватсон, таблицы filmlive_kinobase.dle_post_extras не существует в Вашей базе данных. А какой-то скрипт пытается ее запросить, следовательно вылезает ошибочка.

3 selenii 16.09.2012 12:56

  • selenii
  • Чув-а-а-а-к!!!
  • Карма: 0 / 0

Re: Ошибка MySQL Error 1146 в базе данных DLE

Я это понимаю, но не создавать ведь просто таблицу и все проблемы уидут.

4 Kanra 16.09.2012 13:31

  • Kanra
  • Adsumus! Adsumus!
  • Карма: 25 / 0

Re: Ошибка MySQL Error 1146 в базе данных DLE

selenii пишет:

Я это понимаю, но не создавать ведь просто таблицу и все проблемы уидут.

Ммм… А может исправлять причину? Убирать запрос к этой таблице, если она не нужна. Проблемы по сути не вижу.

5 selenii 16.09.2012 14:23

  • selenii
  • Чув-а-а-а-к!!!
  • Карма: 0 / 0

Re: Ошибка MySQL Error 1146 в базе данных DLE

Я добавил рейтинг немного другой то есть на 10 звездочек и появились вот такие проблемы, что в профиль пользователя нельзя зайти.

Добавлено: 16-09-2012 12:23:30

Проблема решена! Спасибо. Убрал запрос и все нормально стало.

6 Socialkit 08.10.2017 21:48

  • Socialkit
  • Бывалый!
  • Карма: 0 / 0

Re: Ошибка MySQL Error 1146 в базе данных DLE

Версия 2.0.8 от 05.10.2017

1. Внесены некоторые поправки в алгоритмы, отвечающие за SMS и E-Mail верификацию в связи с изменениями в логике работы Instagram.

2. В алгоритм, отвечающий за перевод задач в режим ожидания по расписанию пользователя, внесены поправки, учитывающие время простоя задач в случае их отмены или аварийного завершения. Если при выходе из перерыва по количеству выполненных действий программа обнаруживает, что сейчас должен действовать пользовательский перерыв, заданный через матрицу, то перерывы будут накладываться один на другой, а не суммироваться.

3. Исправлена проблема в функции «Удалить, используя игнор-лист», возникающая при использовании игнор-листов с неверными данными.

4. Исправлены некоторые проблемы, связанные с несоответствием цвета фона в колонке «Задача» после выхода оной из проблемного состояния.

5. В программу добавлена возможность отключать предупреждающие сообщения в функциях, что связаны с изменением технических данных устройства. Соответствующий переключатель находится на закладке «Эксперт» в главном окне программы.

6. Отныне позиции всех окон на экране запоминаются, что поможет лучше организовать свою работу владельцам двух и более мониторов.

7. В задачу «Отписка (+Блокировка)» добавлена возможность обжаловать профили по списку с той или иной формулировкой.

8. В задачи «Подписка по списку пользователей», «Подписка по списку хэштегов», «Подписка по подписчикам конкурентов» добавлена возможность активировать режим сёрфинга с привязкой к числу выполненных действий. По умолчанию этот режим включен, что позволит внести больше разнообразия в выполняемые программой действия в перечисленных задачах.

9. Для задач «Подписка по списку пользователей», «Подписка по списку хэштегов», «Подписка по подписчикам конкурентов» изменена группировка переключателей с подзакладки «Тех. настройки». Добавлены три дополнительные подзакладки «Алгоритмы», «Производительность», «Отладка», между которыми распределены новые и ранее существовавшие переключатели.

10. Исправлена ошибка соединения, которая в редких случаях могла возникать на финальной стадии взаимодействия с тем или иным SMS-сервисом через некоторые прокси в ходе SMS-верификации Instagram-аккаунтов.

11. В функцию массового редактирования профилей и связей добавлена возможность указывать диапазон для определения случайного тайм-аута, который может быть использован при последующей обработке Instagram-аккаунтов. По умолчанию тайм-аут не используется.

12. В редакторе профилей исправлена ошибка, возникающая при одиночном изменении пола того или иного Instagram-профиля на «без пола».

13. При массовой SMS-верификации Instagram-аккаунтов добавлена возможность использовать случайный тайм-аут из установленного диапазона с привязкой к количеству верифицируемых Instagram-аккаунтов. Новый блок настроек находится на подзакладке «Сервисы» в главных настройках программы. По умолчанию тайм-аут не используется.

14. В задачи «Подписка по списку пользователей», «Подписка по списку хэштегов», «Подписка по подписчикам конкурентов» добавлена возможность указывать диапазон циклов, после которого задача может быть переведена на перерыв.

15. Во все задачи, которые поддерживают работу с блоком «Матрица перерывов» добавлена возможность указывать время отложенного старта и/или формировать матрицу пользовательских перерывов для группы Instagram-аккаунтов.

16. В блок «Матрица перерывов» добавлена возможность устанавливать время отложенного старта случайным образом из указанного диапазона для одного или группы Instagram-аккаунтов.

17. Подсчёт и вывод в лог времени работы той или иной задачи осуществляется отныне двумя способами: общее время работы с учётом отложенного старта и перерывов, а также время, затраченное на выполнение всех действий в пределах одного цикла с учётом лишь служебных и пользовательских тайм-аутов между действиями.

18. В задачу «Шпион + Автолайкинг / Автокомментинг» добавлена возможность автоматической смены технических данных устройства во время выполнения задачи для каждого из используемых ботов при обнаружении спам-блокировки.

Стр.: 1

Надо войти или зарегиться

Содержание

  1. How to resolve MySQL ‘1146 table doesn’t exist’ errors in your server
  2. What causes MySQL ‘1146 table doesn’t exist’ error
  3. How to fix MySQL ‘1146 table doesn’t exist’ error
  4. Ошибка? #1146-таблица «xxx. xxxxx» не существует
  5. 18 ответов:
  6. Ошибка? # 1146 — Таблица «xxx.xxxxx» не существует
  7. 18 ответов

How to resolve MySQL ‘1146 table doesn’t exist’ errors in your server

In our role as Support Engineers for web hosts, we manage servers with various services such as web, database, mail, control panels, FTP, etc.

MySQL is the most commonly used database server in Linux hosting and handling the databases and resolving the errors associated with it, is a common task that we perform.

A commonly noticed error in MySQL server is ‘1146 table doesn’t exist’. Today we’ll see what causes this ‘1146 table doesn’t exist’ error in MySQL and how to fix it.

Error : Table ‘mysql.innodb_index_stats’ doesn’t exist
status : Operation failed

What causes MySQL ‘1146 table doesn’t exist’ error

MySQL table errors happen due to many reasons, the major ones we’ve come across include:

  1. InnoDB crash – When the InnoDB server crash due to any process load or user abuse, or if the server was not restarted properly, it can get corrupt and cause table errors to show up.
  2. Missing ibdata file in the MySQL datadir – InnoDB has a data dictionary – the ibdata file and log files, which are crucial for InnoDB to function. If during migrations or restorations, these files go missing, it can prevent InnoDB tables from functioning right.
  3. Improperly placed .frm files – In InnoDB, tables have ‘.frm’ files that define the table format. If these files get deleted or were missed to copy over to the proper database directory, then the tables can show errors.
  4. Incorrect permissions and ownership of MySQL datadir – MySQL has a data directory, usually ‘/var/lib/mysql’ that stores the databases. If the permission and ownership of this directory is not adequate for MySQL to access it, errors would occur.
  5. Corrupt tables or improper table names – If the database tables got corrupt due to improper server shut down or incomplete queries, or if the table name format is not correct, the ‘1146 table doesn’t exist’ error may show up.

How to fix MySQL ‘1146 table doesn’t exist’ error

Inorder to fix the error ‘1146 table doesn’t exist’, we adopt different techniques, after analyzing the root cause of the error.

  1. Restart MySQL server – If the error has happened due to improper server shut down or MySQL service related errors, we restart the service and check if it fixes the issue. If the service doesn’t start properly, we further investigate and fix the error.
  2. Repair the tables – MySQL has tools such as ‘myisamchk’ to repair corrupt databases and tables.
  3. Backup restore – Restoring database backups is the final resort to get the tables back to working condition. We always configure and maintain the backups in our customers’ servers up to date, inorder to ensure that there is no data loss or down time due to unexpected crashes or errors.
  4. Copy ibdata file – If the ‘ibdata’ file is missing, we copy it from the backup and restore it to the data directory for MySQL, after discarding the tablespace to avoid any corruptions or errors.
  5. InnoDB crash recovery – In case where the backup is incomplete or ibdata file is also corrupt, we’ve still been able to recover the tables via our expert crash recovery methods. Read the post ‘Database crash rescue‘ to know more.

[ Use your time to build your business. We’ll take care of your servers. Hire Our server experts to resolve and prevent server issues. ]

At Bobcares, our 24/7 Web Support Specialists constantly monitor all the services in the server and proactively audit the server for any errors or corruption in them.

With our systematic debugging approach for service or other software errors, we have been able to provide an exciting support experience to the customers.

If you would like to know how to avoid downtime for your customers due to errors or other service failures, we would be happy to talk to you.

Источник

Ошибка? #1146-таблица «xxx. xxxxx» не существует

Я использую windows XP. Я создаю таблицу в phpMyAdmin с помощью встроенной функции create table,
мое имя базы данных — ddd .

Он генерирует следующий код:

И появляется следующая ошибка:

В чем может быть проблема?

18 ответов:

У меня тоже была такая же проблема в прошлом. Все произошло после перемещения файлов базы данных в новое место и после обновления сервера mysql. Все таблицы с движком InnoDB исчезли из моей базы данных. Я пытался воссоздать их, но mysql все время говорил мне 1146: Table ‘xxx’ doesn’t exist , пока я не воссоздал свою базу данных и не перезапустил службу mysql.

Я думаю, что есть необходимость прочитать о двоичных файлах таблиц InnoDB.

У меня была та же проблема, и я не могу получить хороший совет для этого через интернет, поэтому я поделился этим для вас и для всех, кто нуждается.

В моей ситуации я копирую базу данных (все файлы: frm, myd) в папку данных в папке данных MySQL (используя Wamp дома). Все было в порядке, пока я не хочу создать таблицу и иметь ошибку #1146 Table ‘. ‘ doesn’t exist! .

Я использую Wamp 2.1 с MySQL версии 5.5.16.

Экспорт базы данных в файл;

Проверьте, экспортируется ли файл действительно в порядке!!;

Удалите базу данных, где у меня есть проблемы;

Создайте новую базу данных с тем же именем, что и предыдущая;

Импортируйте файл в базу данных.

ДЛЯ МЕНЯ ПРОБЛЕМА РЕШЕНА. Теперь я могу снова создавать таблицы без ошибок.

В моем случае я выполнил эту команду, даже если таблица не была видна в PhpMyAdmin:

DROP TABLE mytable

Перезапуск MySQL работает нормально для меня.

Проверьте имена файлов.
Возможно, вам потребуется создать новую базу данных в phpmyadmin, которая соответствует базе данных, которую вы пытаетесь импортировать.

У меня была та же проблема. Я попытался создать таблицу в mysql и получил ту же ошибку. Я перезапустил сервер mysql и запустил команду, и смог создать / перенести таблицу после пересчета.

Сегодня я столкнулся с той же проблемой. Я был в очень сложной ситуации, но какой id я создал таблицу с другим именем, например (modulemaster не создавал, тогда я создаю modulemaster1), и после создания таблицы я просто делаю переименование таблицы.

Я сегодня столкнулся с той же проблемой. Я пытался создать таблицу users , и мне было предложено это ERROR 1146 (42S02): Table users doesn’t exist , что не имело никакого смысла, потому что я просто пытался создать таблицу!!

Затем я попытался отбросить таблицу, набрав DROP TABLE users , зная, что она не будет работать, потому что ее не существует, и я получил ошибку, сказав Unknown table users . После получения этой ошибки, я попытался создать таблицу снова, и волшебным образом, он успешно создал таблицу!

Моя интуиция подсказывает, что я, вероятно, создал это стол до этого так и не был полностью убран каким-то образом. Явно говоря DROP TABLE , мне удалось каким-то образом сбросить внутреннее состояние? Но это только мое предположение.

Короче говоря, попробуйте отбросить любую таблицу, которую вы создаете, и создать ее снова.

As pprakash упоминает выше, копируя таблицу .файлы frm и файл ibdata1 были тем, что работало для меня. (Я бы просто прокомментировал этот комментарий, но это требование SO для 50 пунктов означает, что я должен предоставить решение, даже если это просто повторение существующего . странный.)

  1. Закрой свой клиент проводнике выделенного текста(например, верстак).
  2. остановите службу MySQL (хост Windows).
  3. сделайте безопасную копию практически все!
  4. сохраните копию файла(ов) таблицы (например, mytable.frm ) в папку данных схемы (например, MySQL Server / data / ).
  5. сохраните копию файла ibdata1 в папке data (т. е. MySQL Server/data).
  6. перезагрузите службу MySQL.
  7. убедитесь, что таблицы теперь доступны, доступны для запросов и т. д. В вашем клиенте проводника БД.

После этого все было хорошо. (Не забудьте сделать резервную копию, если у вас есть успех!)

Имена столбцов в таблице должны быть уникальными. В одной таблице не может быть двух столбцов с именем asd .

Источник

Ошибка? # 1146 — Таблица «xxx.xxxxx» не существует

Я использую Windows XP. Я создаю таблицу в phpMyAdmin, используя встроенную функцию создания таблицы, мое имя базы данных ddd .

Он генерирует следующий код:

и появляется следующая ошибка:

В чем может быть проблема?

18 ответов

У меня также была такая же проблема в прошлом. Все это произошло после перемещения файлов базы данных в новое место и после обновления сервера mysql. Все таблицы с движком InnoDB исчезли из моей базы данных. Я пытался их воссоздать, но mysql все время говорил мне 1146: Table ‘xxx’ doesn’t exist , пока я не восстановил свою базу данных и не перезапустил службу mysql.

Мне кажется, что нужно читать бинарные файлы InnoDB.

У меня была такая же проблема и я не могу получить хороший совет для этого через Интернет, поэтому я поделился этим для вас и для всех, кто нуждается.

В моей ситуации я копирую базу данных (все файлы: frm, myd) в папку данных в папке данных MySQL (используя Wamp at home). Все было в порядке, пока я не хочу создать таблицу и имею ошибку #1146 Table ‘. ‘ doesn’t exist! .

Я использую Wamp 2.1 с MySQL версии 5.5.16.

Экспорт базы данных в файл;

проверить, действительно ли экспортированный файл в порядке!

отбросить базу данных, где есть проблемы;

создать новую базу данных с тем же именем, что и последняя, ​​

импортируйте файл в базу данных.

ДЛЯ МЕНЯ РЕШЕНА ПРОБЛЕМА. Теперь я могу создавать таблицы снова без ошибок.

В моем случае я выполнил эту команду, даже если таблица не была видна в PhpMyAdmin:

DROP TABLE mytable

Работал для меня!

Перезапуск MySQL отлично работает для меня.

У меня была та же проблема. Я попытался создать таблицу в mysql и получил ту же ошибку. Я перезапустил сервер mysql и запустил команду и смог создать/перенести таблицу после повторения.

Проверьте имена файлов.
Возможно, вам понадобится создать новую базу данных в phpmyadmin, которая соответствует базе данных, которую вы пытаетесь импортировать.

В качестве pprakash упоминается выше, копирование файлов table.frm И файл ibdata1 работал у меня. (Я бы просто прокомментировал этот комментарий, но это требование SO для 50 пунктов означает, что я должен предоставить решение, даже если это просто передел существующего. странный.)

  • Закройте выделенный клиентом клиент-проводник DB (например, Workbench).
  • Остановить службу MySQL (хост Windows).
  • Сделайте безопасную копию практически всего!
  • Сохраните копию файлов таблиц (например, mytable.frm) в папку данных схемы (например, MySQL Server/data/).
  • Сохраните копию файла ibdata1 в папке с данными (например, MySQL Server/data).
  • Перезапустите службу MySQL.
  • Проверьте, что таблицы теперь доступны, доступны для запросов и т.д. в вашем клиенте проводника DB.

После этого все было хорошо. (Не забудьте сделать резервную копию, если у вас есть успех!)

Сегодня я столкнулся с той же проблемой. Я пытался создать таблицу users , и мне было предложено ERROR 1146 (42S02): Table users doesn’t exist , что не имело никакого смысла, потому что я просто пытался создать таблицу!!

Затем я попытался удалить таблицу, набрав DROP TABLE users , зная, что она потерпит неудачу, потому что она не существует, и я получил сообщение об ошибке Unknown table users . Получив эту ошибку, я попытался снова создать таблицу, и, как ни странно, она успешно создала таблицу!

Моя интуиция заключается в том, что я, вероятно, создал эту таблицу раньше, и она каким-то образом не была полностью очищена. Явным образом сказал DROP TABLE мне удалось reset внутреннее состояние каким-то образом? Но это только моя догадка.

Короче говоря, попробуйте DROP любую таблицу, которую вы создаете, и СОЗДАЙТЕ ее снова.

Сегодня я столкнулся с такой же проблемой. Я был в очень сложной ситуации, но какой идентификатор я создал таблицу с разным именем, например (modulemaster не создавал, затем я создавал modulemaster1), и после создания таблицы я просто делаю таблицу переименования.

Для меня это была проблема с верхним/нижним регистром. Я должен был удостовериться, что имя файла таблицы совпало в запросе удаления, notifications таблицах были не такими же, как Notifications . Я исправил его, сопоставив случай с именем таблицы с запросом и сообщением MySQLWorkbench.

Что странно, так это то, что эта ошибка появилась в обработанном sql-заявлении. Не знаю, что вызвало чувствительность этого случая. Возможно, обновление AWS AWS.

В моем случае параметр MySQL; lower_case_table_names был настроен = 0 .

Он вызывает запросы, связанные с использованием верхних регистров, не будет работать.

У меня была эта проблема из-за срабатывания триггера. Работала после того, как я удалил триггер.

У меня была такая же проблема. Это произошло после ошибки запуска Windows, похоже, из-за этого некоторые файлы были повреждены. Я снова импортировал БД из сохраненного script, и он отлично работает.

Я получил эту проблему после копирования файла таблицы mytable.idb из другого места. Чтобы устранить эту проблему, я сделал следующее:

Скопировать файл mytable.idb

Причина, по которой я столкнулся, состояла в том, что у меня было два файла «models.py», которые содержали несколько разных полей. Я разрешил это:

  • удаление одного из файлов models.py
  • исправление ссылок на удаленный файл
  • затем запустите manage.py syncdb

Недавно у меня была такая же проблема, но на Linux Server. База данных была разбита, и я восстановил ее из резервной копии на основе простого копирования /var/lib/mysql/* (аналоговая папка DATA mysql в wamp). После восстановления мне пришлось создать новую таблицу и получить mysql-ошибку # 1146. Я попытался перезапустить mysql, и он сказал, что это не может начаться. Я проверил журналы mysql и обнаружил, что mysql просто не имеет доступа к своим файлам DB. Я проверил информацию о владельце /var/lib/mysql/ * и получил ‘myuser:myuser’ (myuser is me). Но это должно быть ‘mysql:adm’ (так это собственная машина разработчика), поэтому я сменил владельца на «mysql: adm». И после этого mysql начал нормально, и я мог создавать таблицы или выполнять любые другие операции.

Итак, после перемещения файлов базы данных или восстановления из резервных копий проверьте доступность буферов для mysql.

Надеюсь, что это поможет.

запустить из CMD и% path% = установить в mysql/bin

mysql_upgrade -u user -ppassword

Имена столбцов должны быть уникальными в таблице. Вы не можете иметь два столбца с именем asd в той же таблице.

Источник

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

It generates the following code:

CREATE TABLE  `ddd`.`mwrevision` (

`asd` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`sddd` INT NOT NULL
) ENGINE = INNODB;

and the following error shows up:

MySQL said:     
#1146 - Table 'ddd.mwrevision' doesn't exist 

What might be the problem?

mins's user avatar

mins

5,87611 gold badges52 silver badges72 bronze badges

asked Jun 14, 2011 at 10:29

Shaheer's user avatar

9

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.

Rafael Barros's user avatar

answered Dec 7, 2011 at 4:43

sempasha's user avatar

sempashasempasha

6235 silver badges18 bronze badges

2

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.

Rafael Barros's user avatar

answered Jan 24, 2012 at 6:30

carlos's user avatar

carloscarlos

1111 silver badge2 bronze badges

1

Restarting MySQL works fine for me.

answered Nov 2, 2014 at 18:24

Muhammad Usman's user avatar

Muhammad UsmanMuhammad Usman

10.2k22 gold badges72 silver badges107 bronze badges

0

In my case I ran this command even if the table wasn’t visible in PhpMyAdmin :

DROP TABLE mytable

then

CREATE TABLE....

Worked for me !

answered May 21, 2015 at 9:22

Jim 007's user avatar

Jim 007Jim 007

2201 gold badge3 silver badges8 bronze badges

1

Check filenames.

You might need to create a new database in phpmyadmin that matches the database you’re trying to import.

Mayur Birari's user avatar

Mayur Birari

5,8278 gold badges33 silver badges61 bronze badges

answered Nov 21, 2012 at 15:23

blarg's user avatar

blargblarg

3,72310 gold badges40 silver badges69 bronze badges

2

I had the same problem. I tried to create a table in mysql and got the same error. I restarted mysql server and ran the command and was able to create/migrate table after restating.

answered May 10, 2013 at 11:10

thekosmix's user avatar

thekosmixthekosmix

1,68521 silver badges33 bronze badges

Today i was facing same problem. I was in very difficult situation but what id did i create a table with diffrent name e.g (modulemaster was not creating then i create modulemaster1) and after creating table i just do the rename table.

answered Jun 12, 2013 at 11:57

Vipin Gurjar's user avatar

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.

answered Apr 6, 2015 at 17:51

Xin's user avatar

XinXin

4,2124 gold badges18 silver badges15 bronze badges

As pprakash mentions above, copying the table.frm files AND the ibdata1 file was what worked for me.

In short:

  1. Shut your DB explorer client (e.g. Workbench).
  2. Stop the MySQL service (Windows host).
  3. Make a safe copy of virtually everything!
  4. Save a copy of the table file(s) (eg mytable.frm) to the schema data folder (e.g. MySQL Server/data/{yourschema}).
  5. Save a copy of the ibdata1 file to the data folder (i.e., MySQL Server/data).
  6. Restart the MySQL service.
  7. Check that the tables are now accessible, queryable, etc. in your DB explorer client.

After that, all was well. (Don’t forget to backup if you have success!)

Community's user avatar

answered Aug 17, 2016 at 23:46

SteveCinq's user avatar

SteveCinqSteveCinq

1,8901 gold badge16 silver badges22 bronze badges

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

answered Jun 14, 2011 at 10:32

Oswald's user avatar

OswaldOswald

30.9k3 gold badges43 silver badges68 bronze badges

8

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

mysql_upgrade -u user -ppassword

answered Jun 14, 2011 at 11:04

Ravi Parekh's user avatar

Ravi ParekhRavi Parekh

4,9489 gold badges43 silver badges57 bronze badges

2

Recently I had same problem, but on Linux Server. Database was crashed, and I recovered it from backup, based on simply copying /var/lib/mysql/* (analog mysql DATA folder in wamp). After recovery I had to create new table and got mysql error #1146. I tried to restart mysql, and it said it could not start. I checked mysql logs, and found that mysql simply had no access rigths to its DB files. I checked owner info of /var/lib/mysql/*, and got 'myuser:myuser' (myuser is me). But it should be 'mysql:adm' (so is own developer machine), so I changed owner to ‘mysql:adm’. And after this mysql started normally, and I could create tables, or do any other operations.

So after moving database files or restoring from backups check access rigths for mysql.

Hope this helps…

thvwns's user avatar

thvwns

3,5383 gold badges43 silver badges57 bronze badges

answered Aug 23, 2013 at 8:32

vlad's user avatar

The reason I was facing this was because I had two «models.py» files which contained slightly different fields.
I resolved it by:

  1. deleting one of the models.py files
  2. correcting references to the deleted file
  3. then running manage.py syncdb

answered Nov 11, 2013 at 7:02

Amey's user avatar

I got this issue after copying mytable.idb table file from another location. To fix this problem I did the following:

ALTER TABLE mydatabase.mytable DISCARD TABLESPACE;

Copy mytable.idb

ALTER TABLE mydatabase.mytable IMPORT TABLESPACE;

Restart MySql

answered Apr 13, 2014 at 20:34

l0pan's user avatar

l0panl0pan

4667 silver badges11 bronze badges

1

I had the same issue. It happened after windows start up error, it seems some files got corrupted due to this. I did import the DB again from the saved script and it works fine.

answered Oct 31, 2014 at 22:51

Ayman Al-Absi's user avatar

I had this problem because of a trigger not working..Worked after I deleted the trigger.

answered Aug 2, 2016 at 12:21

DauleDK's user avatar

DauleDKDauleDK

2,9297 gold badges51 silver badges90 bronze badges

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

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

answered Aug 9, 2017 at 6:25

hiropon's user avatar

hiroponhiropon

1,6152 gold badges18 silver badges41 bronze badges

For me it was a table name upper/lower case issue. I had to make sure that table case name matched in a delete query, table notifications was not the same as Notifications. I fixed it by matching table name case with query and what MySQLWorkbench reported.

What is wierd is that this error showed up in a worked sql statement. Don’t know what caused this case sensitivity. Perhaps an auto AWS RDS update.

answered Mar 16, 2018 at 15:43

Kahitarich's user avatar

KahitarichKahitarich

3752 silver badges7 bronze badges

if you are modifying mysql bin->data dir’s and after that, your database import will not works

so you need to close wamp and after that start wamp

now database import will work fine

answered Jan 15, 2021 at 19:03

Hassan Saeed's user avatar

Hassan SaeedHassan Saeed

5,8711 gold badge33 silver badges37 bronze badges

Make sure you do not have a trigger that is trying to do something with the table mentioned in the error. I was receiving Error Code: 1146. Table 'exampledb.sys_diagnotics' doesn't exist on insert queries to another table in my production database. I exported the table schemas of my production database then searched for instances of exampledb.sys_diagnotics the schema SQL and found a debugging insert statement I had added to a table trigger in my development environment but this debug statement had been copied to production. The exampledb.sys_diagnotics table was not present on my production database. The error was resolved by removing the debug statement in my table trigger.

answered May 4, 2022 at 19:33

w. Patrick Gale's user avatar

0 Пользователей и 1 Гость просматривают эту тему.

  • 15 Ответов
  • 11751 Просмотров

Когда захожу в админку в менеджер расширений>база данных, то выскакивает такая ошибка

Обнаружена ошибка.
1146 Table ‘xxxx_newsfeeds’ doesn’t exist SQL=SHOW COLUMNS IN `xxxx_newsfeeds` WHERE Field = ‘filename’

Не уверен, но по-моему, это из-за того что я удалил стандартный компонент ленты новостей, модуль ленты новостей не удален) Что можно предпринять?)))

« Последнее редактирование: 06.11.2015, 11:43:58 от b2z »

Записан

Когда захожу в админку в менеджер расширений>база данных, то выскакивает такая ошибка

Обнаружена ошибка.
1146 Table ‘xxxx_newsfeeds’ doesn’t exist SQL=SHOW COLUMNS IN `xxxx_newsfeeds` WHERE Field = ‘filename’

Не уверен, но по-моему, это из-за того что я удалил стандартный компонент ленты новостей, модуль ленты новостей не удален) Что можно предпринять?)))

Там есть кнопочка «исправить», пробовали нажимать?

В том то и дело что там вообще ничего нету)), есть только  кнопочка «Вернуться в Панель управления» и все.

« Последнее редактирование: 05.11.2015, 15:21:53 от sabnok »

Записан

Там есть кнопочка «исправить», пробовали нажимать?

Вам намекали «исправить» базу данных в Панели Управления.
Менеджер расширений: Проверка базы данных  -> кнопочка «исправить»

Записан

Чистка сайта от дублей в Яндекс и Google.
Миграция Joomla 1.5 до Joomla 3.хх
Доработка сайта

Да я знаю где находится эта кнопочка, но когда нажимаеш на вкладку проверка базы данных, то все исчезает и вылазиет ошибка, понимаете?) Остается только пустое место, верхнее меню админки и ошибка и все)

А как вы удаляли тот стандартный компонент ленты новостей, через менеджер расширений? При удалении не было ошибок?

Да компонент удалил через менеджер расширений — ошибок небыло, а модуль ленты новостей (находиться там же в менеджере расширений/управление/) не удалял, может его надо тоже бахнуть?)

Да компонент удалил через менеджер расширений — ошибок небыло, а модуль ленты новостей (находиться там же в менеджере расширений/управление/) не удалял, может его надо тоже бахнуть?)

Не рекомендую. Чем Вам помешал стандартный компонент? Смысл его удалять, если он опять установится при следующем обновлении?

Да с дуру удалил) может обновить просто тогда Joomla до последней версии? Или надо что то в БД еще править?

Да с дуру удалил) может обновить просто тогда Joomla до последней версии? Или надо что то в БД еще править?

Это надо было сделать ещё вчера

Ага знаю, думал что перед обновлением надо с начало решить проблему с ошибкой этой)

если нет кнопки исправить то вручную вбейте в строке
сайт.ру/administrator/index.php?option=com_installer&task=database.fix

Короче обновил Joomla до последней версии)) Появилась кнопочка исправить)) на нее жмеш и выскакивает другая ошибка:

 1146 Table ‘xxxx_newsfeeds’ doesn’t exist SQL=ALTER TABLE `xxxx_newsfeeds` DROP COLUMN `filename`;

если не помагает
/administrator/index.php?option=com_installer&task=database.fix
то обновите расширения
сайт.ру/administrator/index.php?option=com_installer&view=discover&task=discover.refresh

если не помагает
/administrator/index.php?option=com_installer&task=database.fix
то обновите расширения
сайт.ру/administrator/index.php?option=com_installer&view=discover&task=discover.refresh

Спасибо помогло! Обновил компонент и все стало норм!

Не за что  ^-^

I’m getting a very weird MySQL replication error No. 1146 for a REPLACE INTO query on a slave host replicating all tables in all databases from a master, and I’m having a bit of a hard time understanding why.

Here’s my scenario:

  1. New data is generated solely on the master server, MySQL 5.5.40.
  2. Slave A, MySQL 5.5.38, has been replicating all tables in all databases from this master just fine for a long while, producing no errors of any kind.
  3. IO_THREAD was paused on slave A. Value of Relay_Master_Log_File was confirmed to match that of Master_Log_File and value of Exec_Master_Log_Pos was confirmed to match that of Read_Master_Log_Pos.
  4. A FLUSH TABLES WITH READ LOCK was issued on slave A and a dump of all db’s was subsequently produced from it with mysqldump -v -h localhost -u root -p --all-databases --opt --single-transaction --hex-blob --no-autocommit > dump.sql. Lock was released only after the dump completed, and then the slave IO_THREAD was restarted; replication from master resumed without any problems, and continues to run smoothly to this day on slave A.
  5. The dump was transferred to slave B, MySQL 5.5.34, and loaded successfully into it through a simple mysql -h localhost -u root -p < dump.sql command, after confirming non of the target databases existed on this second host (and actually no db’s other than the mysql db and information & performance schemas). I can also confirm integrity of the dump file after the transfer to slave B thanks to matching RMD160 checksums for it on both hosts.
  6. Slave B was pointed to the master server for replication, with MASTER_LOG_FILE and MASTER_LOG_POS coordinates set to the values of Relay_Master_Log_File and Exec_Master_Log_Pos recorded in step 3 above from slave A, respectively.
  7. Replication was started on slave B, and data started flowing in just fine.

However, after about a day of smooth operation, slave B produced the following error in its SQL_THREAD:

Error 'Table 'knet.course_location_tracks' doesn't exist' on query. Default database: 'knet'. Query: 'REPLACE INTO `course_location_tracks` (`userid`,`courseid`,`lesson_location`,`datestamp`) VALUES (val1,val2,val3,val4)'

(actual row values have been redacted out)

I can’t make much sense of this error because I can confirm not only that the knet.course_location_tracks table exists on slave B, but also that its definition is identical to that of the corresponding table on slave A. Slave A, as I pointed out above, continues to replicate from master just fine to this day, without any problems of any kind.

If replication started fine on slave B, leading me to believe that initial replication coordinates were calculated correctly for it off of the state of slave A at the point of the dump, why am I then getting this error for a table that does exists on the host? Moreover, why am I getting the error on slave B while slave A is still replicating smoothly?

Other than having mismatching MySQL versions across my three hosts (something I only noticed recently in trying to debug the problem, and that I will see to correct ASAP), what could I be doing wrong?

And, finally, once the problem is determined and corrected, how could I get slave B to resume replication at the correct point so that it is again fully in sync with master?

Thanks in advance for any help!

PS: If it matters, replication on slave A was initially set up by transferring all db’s & tables in master to it in a similar fashion, i.e. by first flushing & blocking all tables on master with the read lock, dumping the data with mysqldump (same flags), and finally loading them into the slave with the same mysql command-line client call.

I’m getting a very weird MySQL replication error No. 1146 for a REPLACE INTO query on a slave host replicating all tables in all databases from a master, and I’m having a bit of a hard time understanding why.

Here’s my scenario:

  1. New data is generated solely on the master server, MySQL 5.5.40.
  2. Slave A, MySQL 5.5.38, has been replicating all tables in all databases from this master just fine for a long while, producing no errors of any kind.
  3. IO_THREAD was paused on slave A. Value of Relay_Master_Log_File was confirmed to match that of Master_Log_File and value of Exec_Master_Log_Pos was confirmed to match that of Read_Master_Log_Pos.
  4. A FLUSH TABLES WITH READ LOCK was issued on slave A and a dump of all db’s was subsequently produced from it with mysqldump -v -h localhost -u root -p --all-databases --opt --single-transaction --hex-blob --no-autocommit > dump.sql. Lock was released only after the dump completed, and then the slave IO_THREAD was restarted; replication from master resumed without any problems, and continues to run smoothly to this day on slave A.
  5. The dump was transferred to slave B, MySQL 5.5.34, and loaded successfully into it through a simple mysql -h localhost -u root -p < dump.sql command, after confirming non of the target databases existed on this second host (and actually no db’s other than the mysql db and information & performance schemas). I can also confirm integrity of the dump file after the transfer to slave B thanks to matching RMD160 checksums for it on both hosts.
  6. Slave B was pointed to the master server for replication, with MASTER_LOG_FILE and MASTER_LOG_POS coordinates set to the values of Relay_Master_Log_File and Exec_Master_Log_Pos recorded in step 3 above from slave A, respectively.
  7. Replication was started on slave B, and data started flowing in just fine.

However, after about a day of smooth operation, slave B produced the following error in its SQL_THREAD:

Error 'Table 'knet.course_location_tracks' doesn't exist' on query. Default database: 'knet'. Query: 'REPLACE INTO `course_location_tracks` (`userid`,`courseid`,`lesson_location`,`datestamp`) VALUES (val1,val2,val3,val4)'

(actual row values have been redacted out)

I can’t make much sense of this error because I can confirm not only that the knet.course_location_tracks table exists on slave B, but also that its definition is identical to that of the corresponding table on slave A. Slave A, as I pointed out above, continues to replicate from master just fine to this day, without any problems of any kind.

If replication started fine on slave B, leading me to believe that initial replication coordinates were calculated correctly for it off of the state of slave A at the point of the dump, why am I then getting this error for a table that does exists on the host? Moreover, why am I getting the error on slave B while slave A is still replicating smoothly?

Other than having mismatching MySQL versions across my three hosts (something I only noticed recently in trying to debug the problem, and that I will see to correct ASAP), what could I be doing wrong?

And, finally, once the problem is determined and corrected, how could I get slave B to resume replication at the correct point so that it is again fully in sync with master?

Thanks in advance for any help!

PS: If it matters, replication on slave A was initially set up by transferring all db’s & tables in master to it in a similar fashion, i.e. by first flushing & blocking all tables on master with the read lock, dumping the data with mysqldump (same flags), and finally loading them into the slave with the same mysql command-line client call.

Понравилась статья? Поделить с друзьями:
  • Нос картошкой у девушки как исправить
  • Номер ошибки 1021
  • Нос картошкой как исправить филлерами
  • Нокиа не слышно звонок как исправить
  • Ниссан примера р12 ошибка 1614