Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
mysqldump -u root -p Databasename > backup.sql
如何在此命令中设置密码?我需要在 Python 脚本中运行这个命令。这时,要我输入密码。
mysqldump -u root -pPassword Databasename > backup.sql
阅读本文了解一些基本的安全信息。
假设你在 Unix... env MYSQL_PWD=<password> mysqldump -u root -p Databasename > backup.sql
env MYSQL_PWD=<password> mysqldump -u root -p Databasename > backup.sql
根据mysql 文档。