Cannot read .frm file from mysql "Cannot read column data"

Viewed 1923

We need to restore a mysql table but we didn't manage so far. We have in our hands a .frm and a .idb file.

We try to use mysqlfrm utility to read the .frm file and create the CREATE TABLE statement. By doing so, we have following error message:

mysqlfrm --diagnostic -vvv ourfile.frm

# The .frm file is a TABLE.
# Skipping to header at : 2
# General Data from .frm file:
{'IO_SIZE': 86,
 'MYSQL_VERSION_ID': 100126,
 'avg_row_length': 0,
 'charset_low': 0,
 'create_options': 9,
 'db_create_pack': 2,
 'default_charset': 33,
 'default_part_eng': 0,
 'extra_size': 16,
 'frm_file_ver': 5,
 'frm_version': 10,
 'key_block_size': 0,
 'key_info_length': 33,
 'key_length': 505,
 'legacy_db_type': 'INNODB',
 'length': 4051,
 'max_rows': 0,
 'min_rows': 0,
 'rec_length': 1663,
 'row_type': 0,
 'table_charset': 33,
 'tmp_key_length': 505}
# Skipping to key data at : 56
# Reading key part 0.
# Index (key) Data from .frm file:
{'key_names': ['PRIMARY'],
 'keys': [{'algorithm': 0,
           'block_size': 0,
           'comment': '',
           'flags': 2,
           'key_length': 36,
           'key_parts': [{'field_num': 1,
                          'key_part_flag': 64,
                          'key_type': 0,
                          'length': 36,
                          'offset': 3}],
           'num_parts': 1}],
 'num_key_parts': (1,),
 'num_keys': 1}
# Skipping to default data at : 250
# Skipping to keys at : 8d0
# Engine string: InnoDB
# Partition string:
# Skipping to column data at : a14
{'com_length': 10496,
 'int_length': 0,
 'interval_count': 8695,
 'interval_parts': 0,
 'n_length': 256,
 'null_fields': 3840,
 'num_cols': 40,
 'pos': 2048,
 'unknown': 4161}
# Fields per screen = 0
EXCEPTION: unpack requires a string argument of length 1
ERROR: Cannot read column data.

I search and found similar error message, but without any answer unfortunately. Would you have any suggestion to unlock our situation? I have no idea how was the DB settings before it was lost...

Many thanks, V

0 Answers
Related