I’m trying to write a simple script to mysqldump some dbs. I’m getting stuck on the password prompt though.
I’d like to just have a config file that contains all the db creds, then the script can use those to connect to the db.
Problem is a command such as:
system('mysqldump -u username -p')
then prompts for
Enter password:
even when I do something like:
system('mysqldump -u username -p some_password')
I still get prompted for the password…
I don’t do a whole lot of scripting in Ruby so I’m at a loss as to how my script can automatically enter this info so the user running the script doesn’t have to.
you need to delete space after
-por without password just
or