如何导入mysql dump? [英] How can I import a mysql dump?

查看:101
本文介绍了如何导入mysql dump?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只为数据库中的一个表创建了一个mysql转储。我用来创建转储的命令是 mysqldump -uroot -p database_name table_name> backup.sql 。现在,当我尝试使用命令 mysql -uroot -p database_name table_name< backup.sql 将数据导入计算机时,我什么也没得到。

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.

我只能在命令行上获取文本,这向我解释了如何使用mysql命令。我在这里缺少什么吗?

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

推荐答案

删除表名

mysql -uroot -p database_name < backup.sql

这篇关于如何导入mysql dump?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆