gpt4 book ai didi

mysql - 备份时出错

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

我是 MySQL 新手。我需要在 MySQL 中备份数据库。所以我写了一个查询:

mysqldump -u root -p pwd123 r_mysql > BackupHRM2.sql

为此我收到一条错误消息

#1064 - You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use
near 'mysqldump -u root -p pwd123 r_mysql > BackupHRM2.sql' at line 1

有人可以帮我解决这个问题吗?

最佳答案

mysqldump 是一个命令行工具。你应该直接从你的 shell 运行它,而不是在 mysql session 中。这不是 SQL 命令。

如果您使用的是 phpMyAdmin,请在那里寻找备份选项。 (例如,查看 How to backup your Mysql database with phpMyAdmin。)

关于mysql - 备份时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5512463/

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