mysqldump unknown table ‘column_statistics’

mysqldump unknown table ‘column_ statistics’ in information_ schema

mysqldump: Couldn’t execute ‘SELECT COLUMN_ NAME,JSON_ EXTRACT(HISTOGRAM, ‘$.”number-of-buckets-specified”‘) FROM information_ schema.COLUMN_ STATISTICS WHERE SCHEMA_ NAME = ‘wuxiancheng’ AND TABLE_ NAME = ‘orange’;’: Unknown table ‘column_ statistics’ in information_ schema (1109)

If you use the command-line tool mysqldump provided by MySQL version 8.0 + to export a MySQL database lower than version 8.0 to a SQL file, an unknown table ‘column will appear_ statistics’ in information_ Schema error, because of the information of earlier versions of MySQL database_ There is no column named in the schema database_ Statistics data table

The way to solve the problem is to use the mysqldump tool attached to MySQL before 8.0. It is better to use the mysqldump tool corresponding to the version number of the MySQL server to be backed up. Mysqldump can run independently and does not rely on the complete MySQL installation package. For example, in windows, you can copy mysqldump.exe directly from the bin directory of the MySQL installation directory to other folders, Even copy from one computer to another and run it in the CMD window

Similar Posts: