ok so i need to do a mysqldump of a database and this is what i have
mysqldump -uroot -psdfas@N$pr!nT --databases app_pro > /srv/DUMPFILE.SQL
but i am getting this error
-bash: !nT: event not found
seems to be having a hard time with the password...any other way to mysql dump
Recover MySQL root passwordStop the MySQL server process. Start the MySQL (mysqld) server/daemon process with the --skip-grant-tables option so that it will not prompt for a password. Connect to the MySQL server as the root user. Set a new root password.
To check if the password matches, create your hash for the password the user put in. Then perform a query against the database for the username and just check if the two password hashes are identical. If they are, give the user an authentication token.
Put -psdfas@N$pr!nT
in single quotes:
mysqldump -uroot '-psdfas@N$pr!nT' --databases app_pro > /srv/DUMPFILE.SQL
The problem is that bash is interpreting the !
. Strings in single quotes aren't interpreted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With