This question already has an answer here:
I would like to write a bash script containing next command:
mysqldump -u root -p moodle > moodle_sql_backup_21_08_2018.sql
I added #!/bin/bash but then I get stuck with two problems:
-p parameter doesn't take password thus I have to write password every time. Is there a way to save password into command?
automating date change in name of sql file, is it possible? Something like
from PHP world?