rkevx21
rkevx21

Reputation: 3929

MYSQL: mysqldump returns empty after import

I need some help, why is it that after importing an mysqldump (table) at first you can see result, but when you exit

 mysql -uroot -proot

and select again the table then check, it returns empty.

Upvotes: 0

Views: 1723

Answers (2)

jvb
jvb

Reputation: 61

Or start mysql command shell using:

>mysql -u youruser -p yourdatabase

and then check up your table.

mysql>select * from yourtable;

P.S If you didn't choose any database you get appropriate error 1046:

 No database selected.

If you don't get such error message and see you table empty YOU CHOSE WRONG DATABASE.

Upvotes: 0

Zafar Malik
Zafar Malik

Reputation: 6844

first connect mysql by below command-

mysql -uroot -proot

Note: assuming root is password of root user.

Now connect to database in which you imported table-

use my_db;

Now check your table by-

show tables;
or
show tables like 'my_table'

If still getting error then show how you import data and show first few lines of your backup if possible.

Upvotes: 1

Related Questions