MySQL 转储。文件的位置?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10813009/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
mysqldump. Location of the file?
提问by BlackMouse
I did an update on my db, but can't find the file so I can download it. Where is the file located at? Thanks in advance
我对我的数据库做了更新,但找不到文件,所以我可以下载它。文件位于何处?提前致谢
root@xxxx:~# mysqldump -u root -p cherio > myBackup.sql
Enter password:
root@xxxx:~# find myBackup.sql
myBackup.sql
EDIT:
编辑:
I tried this:
我试过这个:
root@xxxx:~# find / -name "myBackup.sql"
/root/myBackup.sql
Ok, I had to refresh my FTP for the file to show up.
好的,我必须刷新我的 FTP 才能显示文件。
回答by Panagiotis
On the same directory you made the dump. It's ./myBackup.sql and not myBackup.sql Do an ls -all.
在您进行转储的同一目录中。它是 ./myBackup.sql 而不是 myBackup.sql 做一个 ls -all。
回答by manurajhada
It is at either at root or in current directory where you run the dump command. try this command on terminal..
它位于根目录或运行 dump 命令的当前目录中。在终端上试试这个命令..
locate myBackup.sql
回答by Umesh Patil
It is in the same directory where you ran this command. To check this, run "pwd", it will give you your current path. Then run the command and it will store the database file in the same directory. To get generated file properly run following command,
它位于您运行此命令的同一目录中。要检查这一点,请运行“pwd”,它将为您提供当前路径。然后运行该命令,它会将数据库文件存储在同一目录中。要正确获取生成的文件,请运行以下命令,
mysqldump --database --user=root --password your_db_name > export_into_db.sql
This will give you the "export_into_db.sql" database file. Play with it.
这将为您提供“export_into_db.sql”数据库文件。玩它。
Enjoy...
享受...
回答by molu2008
I had the same problem. It comes out that for some reason I could not create any file at root directory. Try to go into some deeper folder For example
我有同样的问题。结果是由于某种原因我无法在根目录中创建任何文件。尝试进入一些更深的文件夹 例如
cd var
cd www
and than execute:
然后执行:
mysqldump -uUSERNAME -pPASSWORD DATABASE > backup.sql