Scene:
Host A and Host B in the LAN, has been on the host a with a scheduled task in the run mysqldump to back up the database on Host B, the first two days suddenly appear: warning:using a password on the command line interface can be Insecure.
The code for the previous scheduled task is:
Mysqldump-h10.255.xxx.xxx-uroot-pxxxx dbxxx | gzip >/root/db/backup/dbname_$ (Date +\%y\%m\%d-\%h). sql.gz
Then it executes directly on host A, prompting warning:using a password on the command line interface can is insecure. And the backup is unsuccessful.
Then change the code to:
Mysqldump-uroot-pxxxx-h 10.255.xxx.xxx dbxxx | gzip >/root/db/backup/dbname_$ (Date +\%y\%m\%d-\%h). sql.gz (just put the parameter of-H on the back)
Again, you will still be prompted warning:using a password on the command line interface can be insecure. But can be backed up successfully.
mysqldump hint warning:using a password on the command line interface can be insecure.