tags:

views:

15

answers:

1

I use a ruby program to download data from staging server and to populate that data to my local mysql server where the userid is root and password is empty.

cmd = "mysql -u #{user}  -p'#{password}' my_db < out.sql"

Since password is empty, I get prompted for password. I just have to hit enter. I would like to avoid that. What's the fix?

+1  A: 

Omit the -p option.

Andy West