我正在实现一个脚本来备份我的MySQL数据库。所有的过程都是好的,当它完成时,我会发送一封电子邮件。但是我想把文件附在那封电子邮件里,我不知道该怎么做。我的命令行是:
mail -s "$1" -a "MIME-Version: 1.0;" -a "Content-type: text/html;" root@$domain -c ops@mydomain.com
我正在尝试各种方法来创建一个数据库,并从命令行使用sql脚本填充它。mysql --user=root --password=hello --execute=create database test --source='accounts.sql'-> starts to print help 或者是唯一的数据库: mysql --user=root --password=hello --execute=create database