如果數(shù)據(jù)庫比較大,備份數(shù)據(jù)庫較多的還是用 mysqldump 命令比較好,但是在mysql5.7版本以上備份數(shù)據(jù)庫的時候有報錯問題。
1、mysqldump: [Warning] Using a password on the command line interface can be insecure.
這個報錯問題,是因為 從 mysql5.7開始不可以在命令代碼中留下密碼,這樣確保信息的安全。當然你留也沒事,不影響進度。
2、mysqldump: Error: 'Access denied; you need (at least one of) the PROCESS privilege(s) for this operation' when trying to dump tablespaces
這個報錯其實也可以忽視,如果你覺得難看,就在 mysqldump 最后加上 "--no-tablespaces"。
mysqldump -uzhujipingjia -pzhujipingjiacom zhujipingjia> zhujipingjia.sql --no-tablespaces
這樣問題就解決。
評論