Hey all, Got a LAMP Ubuntu 16.04 Server running postix & dovecot, iredmail, roundcube. Everything is working well, no problems with server. I do get this warning in the logwatch: Code: Cron <root@mail> /bin/bash /var/vmail/backup/backup_mysql.sh mysqldump: [Warning] Using a password on the command line interface can be insecure. mysql: [Warning] Using a password on the command line interface can be insecure. mysqldump: [Warning] Using a password on the command line interface can be insecure. mysql: [Warning] Using a password on the command line interface can be insecure. mysqldump: [Warning] Using a password on the command line interface can be insecure. mysql: [Warning] Using a password on the command line interface can be insecure. mysqldump: [Warning] Using a password on the command line interface can be insecure. mysql: [Warning] Using a password on the command line interface can be insecure. mysqldump: [Warning] Using a password on the command line interface can be insecure. mysql: [Warning] Using a password on the command line interface can be insecure. mysqldump: [Warning] Using a password on the command line interface can be insecure. mysql: [Warning] Using a password on the command line interface can be insecure. ==> Backup completed successfully. ==> Detailed log (/var/vmail/backup/mysql/2016/11/30/2016-11-30-03:30:01.log): ========================= * Starting backup: 2016-11-30-03:30:01. * Backup directory: /var/vmail/backup/mysql/2016/11/30. * Backing up databases: vmail mysql amavisd iredapd roundcubemail iredadmin. * File size: ---- 8.0K amavisd-2016-11-30-03:30:01.sql.bz2 4.0K iredadmin-2016-11-30-03:30:01.sql.bz2 8.0K iredapd-2016-11-30-03:30:01.sql.bz2 184K mysql-2016-11-30-03:30:01.sql.bz2 1.4M roundcubemail-2016-11-30-03:30:01.sql.bz2 4.0K vmail-2016-11-30-03:30:01.sql.bz2 ---- * Backup completed (Success? YES). I don't know how to fix this warning. My root/password is written in the /var/vmail/backup/backup_mysql.sh file. WHich file should the root/password be in? Regards
You can either ignore this warning or read the password from a file. You can create /root/.my.cnf and add: [mysqldump] user=root password=PASSWORD With this you can remove the password and user for mysqldump from your script
Thank you for your response If I was to create the new file, Other than removing the root/pass from the original file, how does Mysql know to go to the new file? Thank you!
Hi Florian, I tried all points mentioned by you but still facing error Error 1045(28000): access denied for users 'root@localhost' (using password : no). Please help