Mysqlpump via ssh in vagrant not working

I’m following the instructions mentioned in the “PHP Novice to Ninja” book and I’m trying to create a backup of the data of one of my mysql databases using mysqlpump (A mysql command line utility).
First, I write
vagrant ssh
in the Git Bash console to create a secure shell on the web server and then write this
mysqlpump -u mojtabaavdev -papassword matab > matab.sql
but then I get this error:
-bash: line 2: $'\E[A\E[C\E[B\E[D\E[Dmysqlpump': command not found
I have also tested the same command on the database provided by the book itself(called ijdb)(with a different pair of username and password: homestead and secret) and I get the same error.

  • Any helps would be appreciated, since there are few articles or instructions about this on the internet.
    It might be obvious(and in case it’s not I should mention that) I’m pretty new to command line utilities and SSH and other stuff like these I’ve talked about here.

Pretty sure mysqlpump should be mysqldump

1 Like

Sorry, no: mysqlpump

1 Like

By golly there is a command called mysqlpump. I have never gone through the book and I’m a little bit surprised it uses vagrant. I suspect you don’t have a PATH variable pointing to the mysql bin directory for you user. Maybe try spelling out the complete path to mysqlpump.

1 Like

Vagrant is used to give a similar feeling of working with a real server. I can’t say it’s been a bad choice but it really made life hard for me to move forward in the book at some points. Currently, I’m at one of those points! :smiley: I think I’ll skip this one since my knowledge about anything related to command line is very limited. (Do I need to take an LPIC tutorial for that?)

Don’t know what LPIC means but understanding how to use a command line is a very useful skill. Might be wise to pursue it at some point.

1 Like

I’m afraid I’m unable to replicate this and on a quick test it works correctly.

It looks like several strange characters are being included before the command " $‘\E[A\E[C\E[B\E[D\E[Dmysqlpump’:" would be just “bash: line 2: mysqlpump’: command not found” if there were no characters before the command. Make sure you type the command and only the command (and don’t copy/paste it, as it may include some odd whitespace).


I’m not copy pasting it. I don’t know what else might be wrong. Anyway, thanks Tom for your great book. I really enjoy reading it. (Currently I’m at page 548 :smiley: I specially loved the catch-22 problem and the way you solved it using references.) I appreciate it. <3

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.