問題
$ mysqldump -h10.10.10.10 -P33706 -utesterzhang -p密碼 dns >dns.sql
mysqldump: [Warning] Using a password on the command line interface can be insecure.
mysqldump: Couldn't execute 'SELECT COLUMN_NAME, JSON_EXTRACT(HISTOGRAM, '$."number-of-buckets-specified"') FROM information_schema.COLUMN_STATISTICS WHERE SCHEMA_NAME = 'dns' AND TABLE_NAME = 'dns_info';': Unknown table 'COLUMN_STATISTICS' in information_schema (1109)
居然報錯:Unknown table 'COLUMN_STATISTICS' in information_schema (1109)
分析解決
我的數(shù)據(jù)庫是5.7版本,而我的客戶端是8.0版本
$ mysql -V
mysql Ver 8.0.26 for macos10.14 on x86_64 (Homebrew)
那么加個參數(shù)吧:--column-statistics=0
$ mysqldump --column-statistics=0 -h10.10.10.10 -P33706 -utesterzhang -p密碼 dns >dns.sql
歡迎關(guān)注我的同名公眾號,原創(chuàng)技術(shù)文章第一時間推送。
如果你有遇到Linux系統(tǒng)或者其他技術(shù)問題,也可以付費協(xié)助解決。