LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-09-2014, 04:28 AM   #1
jojanmpaul
Member
 
Registered: Sep 2012
Location: Bangalore
Posts: 80

Rep: Reputation: Disabled
Thumbs up Table doesn't exist error in MySQL


I am trying to do mysql dump but its not happening, tried individual databases also the same issue.

Command used,

mysqldump -u root -p mysql | gzip -9 > /root/mysql-`date +%y-%m-%d`.sql.gz

mysqldump: Got error: 1146: Table 'mysql.innodb_index_stats' doesn't exist when using LOCK TABLES
 
Old 01-09-2014, 04:40 AM   #2
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,102

Rep: Reputation: 181Reputation: 181
i think you already have an answer to your question.

please check whether "mysql.innodb_index_stats" really exist as a table.

on mysql, type: show tables check whether the error of mysql is just trying to trip you up.

if indeed it's true; try creating the said table and run the command that you want and check if you will have an error again.

after creating the table, just run once the command that you want. If you run it more than once, you will end up with an error.
 
Old 01-09-2014, 04:51 AM   #3
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 3,880
Blog Entries: 1

Rep: Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998
Quote:
Originally Posted by jojanmpaul View Post
I am trying to do mysql dump but its not happening, tried individual databases also the same issue.

Command used,

mysqldump -u root -p mysql | gzip -9 > /root/mysql-`date +%y-%m-%d`.sql.gz

mysqldump: Got error: 1146: Table 'mysql.innodb_index_stats' doesn't exist when using LOCK TABLES
If your command is as shown, you have not specified a database to dump.

You must tell it which database, and optionally the tables, or you must use the --all-databases option.

Code:
Usage: mysqldump [OPTIONS] database [tables]
OR     mysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]
OR     mysqldump [OPTIONS] --all-databases [OPTIONS]

Last edited by astrogeek; 01-09-2014 at 04:52 AM.
 
Old 01-09-2014, 04:57 AM   #4
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,102

Rep: Reputation: 181Reputation: 181
hi astrogeek, good catch.. yup looks like there was no database name and table name provided.

--all-databases option good option if need to wipe out everything.. hehehe...
 
Old 01-09-2014, 06:50 AM   #5
jojanmpaul
Member
 
Registered: Sep 2012
Location: Bangalore
Posts: 80

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by JJJCR View Post
i think you already have an answer to your question.

please check whether "mysql.innodb_index_stats" really exist as a table.

on mysql, type: show tables check whether the error of mysql is just trying to trip you up.

if indeed it's true; try creating the said table and run the command that you want and check if you will have an error again.

after creating the table, just run once the command that you want. If you run it more than once, you will end up with an error.
I have crosschecked, nothing but few tables are missing in some databases and in few databases there is no table present. I have no idea how the tables got deleted from the user end because they don't have any access privileges to the db.
 
Old 01-13-2014, 02:35 AM   #6
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,102

Rep: Reputation: 181Reputation: 181
have you tried to check mysql logs? whether you will be able to find some clue on why the table was deleted.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql 'Table 'mysql.user' doesn't exist' Joe of Loath Linux - Server 13 08-05-2010 07:54 AM
ERROR 1146: Table 'information_schema.tables' doesn't exist neverland Linux - Server 3 07-15-2010 03:59 PM
Strange database issue table doesn't exist [error code: 1146] edenCC Linux - Server 2 06-20-2010 01:29 AM
mysql error (mysql.host doesn't exist) serverul Linux - Server 1 09-07-2007 02:30 PM
Table 'mysql.host' doesn't exist Zac2003 *BSD 5 09-14-2003 01:37 PM


All times are GMT -5. The time now is 10:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration