I have a mysql server running on an ubuntu server. on the mysql server I have a database with a few schema and tables. I run a mysql_backup.sh file daily with a cron job to create backups of my mysql database. The mysql_backup.sh file has the script below. I checked and noticed that when the mysql_backup.sh file runs it seems to create a file that just has a few lines of general mysql function descriptions. I've included some example output that the mysql_backup.sh file creates below. Does anyone see what I'm doing wrong and can you suggest how to modify the mysql_backup.sh script so that it creates mysql backups of the database?
mysql_backup.sh
code:
#!/bin/bash
mysqldump -u root -p psswd --all-databases > /home/mysql_backups/backup_$(date +%F.%H%M%S).sql
example current output:
Usage: mysqldump [OPTIONS] database [tables]
OR mysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]
OR mysqldump [OPTIONS] --all-databases [OPTIONS]
For more options, use mysqldump --help