I want to backup my local MySQL
database by using the MAC Terminal but when I enter:
/usr/local/mysql/bin/mysqldump -uroot -p localdev > localdev.sql
I get the error: Permission denied
I tried to add a password to my local phpmyadmin
so that the password for the root user is 123456 but when I entered:
/usr/local/mysql/bin/mysqldump -uroot -p123456 localdev > localdev.sql
I get the same error!?!
I’m using MAMP, so can that be a reason it fails?
Please help
2
Answers
Allright, I found out tHAT I needed to change the path to:
This solved it :-)
Thanks for all your help anyway!
You need a space between -u and username, like this:
Space between -p and password DONT need