在mysql命令行中使用mysqldump进行备份时出错 [英] Error while taking backup with mysqldump in mysql command line

查看:365
本文介绍了在mysql命令行中使用mysqldump进行备份时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在尝试从mysql命令行客户端进行备份.我正在使用mysqldump使用用户名和密码进行备份. 以下是我用于备份数据库的命令.

Hello I'm trying to take backup from mysql command line client. I'm using mysqldump to take backup with username and password. Following is the command I'm using for backing up the database.

mysql> mysqldump -u username -p password databasename > backup.sql;

我遇到以下错误

ERROR 1064 (42000): 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 'mysql
dump -u username -p password fms > backup.sql' at line 1

尽管该命令似乎是正确的,但我仍然遇到错误.请让我知道,还有其他方法可以从mysql命令行进行备份.

Though the command seems to be correct, still i'm getting error. Please let me know is there any other way taking backup from mysql command line.

提前谢谢.

推荐答案

mysqldump不是MySQL命令,它是命令行实用程序.您必须从Shell命令行调用它.

mysqldump is not a MySQL command, it is a command line utility. You must call it from your shell command line.

这篇关于在mysql命令行中使用mysqldump进行备份时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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