gpt4 book ai didi

database - Mysqldump 连接问题

转载 作者:行者123 更新时间:2023-11-30 01:11:33 24 4
gpt4 key购买 nike

我正在尝试使用下一个命令进行转储:

mysqldump -v -u root -p -h 127.0.0.1 -P 3308 -x --add-drop-table --add-locks --create-options -K -e -q -A > database.sql

结果(输入密码后)是消息“Connecting to 127.0.0.1...”。之后就什么都没有了(没有任何错误,只是等待)。

database.sql 是空文件。

为什么我没有看到任何事件?是bug吗?

最佳答案

来自http://linuxcommand.org/man_pages/mysqldump1.html

The password to use when connecting to the server. If you use the short option form (-p), you cannot have a space between the option and the password. If you omit the password value following the --password or -p option on the command line, you are prompted for one.

系统可能正在等待您输入密码。

如果您想避免这种情况,只需在命令中添加密码即可。假设您的密码是“FLOWER”:

mysqldump -v -u root -pFLOWER -h 127.0.0.1 -P 3308 -x --add-drop-table --add-locks --create-options -K -e -q -A > database.sql

关于database - Mysqldump 连接问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19435686/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com