5

I have created a mysql dump for only one table in my database. The command I used to create the dump was mysqldump -uroot -p database_name table_name > backup.sql. Now, when I am trying to import the data into my machine using the command "mysql -uroot -p database_name table_name < backup.sql" I am not getting anything.

I only get text on command line which explains me how to use mysql command. Is there anything i am missing here?

2 Answers 2

9

Remove table_name.

mysql -uroot -p database_name < backup.sql 
Sign up to request clarification or add additional context in comments.

2 Comments

Do you know the root password?
and reember that the host is included in the grants - root isn't uber everywhere unless the server is set up that way
0

Does the schema exist on your server? If you didn't used the --databases option, I don't think it adds the create database database_name and use database_name. You might have to execute these steps manually from the command line client.

1 Comment

Schema does exist on my server

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.