0

I am trying to export the database of my project as a backup, however when writing the command it's nothing happened,

I am writing the code for dump/export my database

                 mysql>mysqldump -umyusername -p mydatabasename >mydatabasename_bckup.sql

and after that when enter the button, it's something like

                  mysql>mysqldump -umyusername -p mydatabasename >mydatabasename_bckup.sql

                  >    

And it's nothing happening.

danblack
  • 12,130
  • 2
  • 22
  • 41
user10945543
  • 65
  • 1
  • 3
  • 12
  • 1
    putty can do port forwarding. Use this to connect a local port to the remote database port/socket. Then `mysqldump --host 127.0.0.1 --port X ....` – danblack Mar 13 '20 at 04:58
  • https://stackoverflow.com/questions/40024280/mysqldump-via-ssh-to-local-computer – Hirumina Mar 13 '20 at 05:02
  • @danblack, appreciate for your help here, however, i am trying to do same command line that you have suggested, the thing is that the NEXT line is ">" and after it's nothing happeing, however can you write the full command thanks – user10945543 Mar 13 '20 at 05:05
  • mysqldump isn't a mysql prompt command. Its a executable on its own, so the mysqldump command is run in the shell/window/terminal. – danblack Mar 13 '20 at 05:07
  • exit mysql and run that command from outside. mysqldump is a shell command. – shaahiin Mar 13 '20 at 05:59
  • thanks all now using the same that you mentioned , however error is "-bash: f:dbcerca_bckup.sql: Permission denied". – user10945543 Mar 13 '20 at 06:01
  • @Shaahiin, i did but i mentioned error above – user10945543 Mar 13 '20 at 06:01
  • you seem to be running mysqldump on the remote linux machine using a local windows path. This won't work. Try [this](https://stackoverflow.com/a/52774791/10195153). – danblack Mar 13 '20 at 06:20
  • Thanks @danblack yeah, you are right , so, is it not possible through command to export the database. – user10945543 Mar 13 '20 at 06:23
  • put the mysqldump command after the plink command in the previous link, execute that locally. redirect the output of the plink file to a local file. Good luck. Have a good weekend. – danblack Mar 13 '20 at 06:28
  • @danblack, Thanks and same to you, I hope will done. – user10945543 Mar 13 '20 at 06:29
  • @danblack, i tried with same and it's working however it's not saving my 80 MB of sql file in to system. thanks – user10945543 Mar 13 '20 at 06:48
  • Hey all, I have done, it, first i was need to make a folder in server then export file and it has done command tmp$ mysqldump -uce -p ce > ce_backup.sql......thanks for all support, happy weekend to all – user10945543 Mar 13 '20 at 07:41

0 Answers0