![](https://seccdn.libravatar.org/avatar/37ec8d88d5ac6a3f5cd17719923f70c8.jpg?s=120&d=mm&r=g)
i have sql files in a directory and trying to restore the data how would i pass the password in my script to avoid typing it 100 times for i in *; do mysql -u root -p phpwebsite < $i done i am trying to avoid typing the password 100 times??
![](https://seccdn.libravatar.org/avatar/e0d5e7d759f2340bc28fc8825340e8cf.jpg?s=120&d=mm&r=g)
On Saturday 26 October 2002 03.23, R. R. wrote:
i have sql files in a directory and trying to restore the data
how would i pass the password in my script to avoid typing it 100 times
for i in *; do mysql -u root -p phpwebsite < $i done
i am trying to avoid typing the password 100 times?? From "man mysql"
-p|--password[=pwd] Employ the specified password when connecting to the database server. If a password is not sup plied, it will be requested interactively. Anders
participants (2)
-
Anders Johansson
-
R. R.