how to import and export mysql dump file in mac
like in windows, I use this code:
mysqldump -u root -p --databases DBname>d:\ FILENAME.sql
but it does not work in mac terminal. it produce error:
-bash: mysqldump: command not found
how to import and export mysql dump file in mac
like in windows, I use this code:
mysqldump -u root -p --databases DBname>d:\ FILENAME.sql
but it does not work in mac terminal. it produce error:
-bash: mysqldump: command not found
The location where mysqldump is installed need to be declared in your $PATH.
If you don't know how to edit your $PATH on macOS, you can refer to this question.
For example, if your mysqldump binary is located in /usr/local/mysql/bin, you can edit your $PATH to:
export PATH=$PATH:/usr/local/mysql/bin
With this modification, you won't have to provide the full path to the mysqldump binary every time and will be able to use your command:
$ mysqldump -u root -p --databases DBname>d:\ FILENAME.sql
i forget to give path to it the query is
/usr/local/mysql/bin/mysqldump -uroot -p friendstree > friendstree.sql
it worked