In 3 places the root MySQL password is passed in the --password option. So any n00b user on the machine can see it in the process listing output. This is a security hole like a pig. If he sees it, he has root MySQL access on the machine. Also when someone walks by the screen he can read the password and later gain root access on the machine's MySQL. mysqldump \ -uroot \ --password=your_password \ -hlocalhost \ --all-databases \ --opt \ --allow-keywords \ --flush-logs \ --hex-blob \ --master-data \ --max_allowed_packet=16M \ --quote-names \ --result-file=BACKUP_MYSQL_4.0.SQL # cat BACKUP_MYSQL_4.0.SQL \ | mysql \ -uroot \ --password=your_password \ -hlocalhost \ --max_allowed_packet=16M # mysql_fix_privilege_tables \ --defaults-file=/etc/mysql/my.cnf \ --user=root \ --password=your_password
You should probably check things before you file bug reports, mysql hides the password from the ps list: tomk 7944 0.2 0.5 5128 2172 pts/18 T 15:49 0:00 mysql -uroot -px xxxxxxxxx
It's done in a way that bash does exec into mysql and mysql then overwrites the commandline. However there exists short time when the password can be read. This short time is still a serious security hole. When the user performs a temporary DoS attack on the machine, he can slow down the scheduling and pageouts so much that he can actually intercept the password.