问题
$ 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)
分析解决
我的数据库是5.7版本,而我的客户端是8.0版本
$ mysql -V
mysql Ver 8.0.26 for macos10.14 on x86_64 (Homebrew)
那么加个参数吧:--column-statistics=0
$ mysqldump --column-statistics=0 -h10.10.10.10 -P33706 -utesterzhang -p密码 dns >dns.sql
欢迎关注我的同名公众号,原创技术文章第一时间推送。
如果你有遇到Linux系统或者其他技术问题,也可以付费协助解决。