The other two answers have already stated the following solution (so consider this an extension of the other two answers):
mysqldump -u root -p --all-databases | zip /var/www/html/db-$(date +\%F-\%T).zip -
This is good, but this works only on stdin/stdout. This means that the file will be stored as
- inside the archive, and can only normally be extracted sanely to stdin. This means to actually extract this data from the ZIP, you will have to do this:
unzip -p myZipFile.zip > myBackup.sql
If you want to make a "normal" ZIP file (where things have a real name), you will have to do some really complicated things or just do what you're already doing so there's no net gain.
As MySQL itself is stdin-aware, you can restore directly from a backup using the below command (as an example):
unzip -p myDataBackup.zip | mysql -uroot -pMyInsecurePassword