mysql 5.5 使用MYSQLDUMP 不能直接使用命令行明文密码,不然会报
>Warning: Using a password on the command line interface can be insecure.
在/etc/my.cnf中加入
[mysqldump]
user=root
password=root

然后使用mysqldump
mysqldump --all-databases >/dir