简体   繁体   中英

How can I import a mysql dump?

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?

删除table_name

mysql -uroot -p database_name < backup.sql

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM