mysqldump command not working?

浪尽此生 提交于 2019-12-06 20:34:15

问题


I am using mysqldump to take backup of my database, but the command is not working.. the command i am using is mysqldump -u root dbname> 'c:\backupdatafolder\backup.sql' i am running this command in MySQL cli but not running,..is there any thing wrong in the command?


回答1:


You are supposed to run that on the command line of your operating system not on the MySQL CLI.

cd to the bin folder of MySQL first, something like C:\mysql\bin or wherever your MySQL is installed on




回答2:


If the mysqldump can not be identified by your CMD prompt (I believe you are using Windows), then you first have to go to the bin folder where this command can be found. In my case, the path is "C:\wamp\bin\mysql\mysql5.5.24\bin", it would be more or less the same path for you. After that open your CMD prompt and go to this path by command "cd C:\wamp\bin\mysql\mysql5.5.24\bin". Now you should run your mysqldump command for taking the backup as you have been trying. Hope this helps!



来源:https://stackoverflow.com/questions/2979464/mysqldump-command-not-working

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!