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