MySQL Forums
Forum List  »  Backup

Mysqldump from windows Powershell
Posted by: poli diaz
Date: November 17, 2014 05:53AM

Hi, i am trying to automate backups in a windows server that hast Mysql databases
I tried many scripts but it keeps failing..
If i try to run this command:
"C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqldump.exe" -h $server -u root -pmypassword test > $fullPath "
I got the error:
cmd.exe : Warning: Using a password on the command line interface can be insecure.

So i tried to create aconfig.cfg file with the contents:
[client]
user=root
password=mypassword
host=localhost

And the call the config file with:
"C:\Program Files\MySQL\MySQL Server 5.6\bin\mysql.exe" --defaults-extra-file=e:\backups\config.cnf
But i got the error:
mysql.exe : ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)


How can i automate this ?

Thanks

Options: ReplyQuote


Subject
Views
Written By
Posted
Mysqldump from windows Powershell
6908
November 17, 2014 05:53AM
2800
November 18, 2014 09:39AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.