0

After a server crash, I lost all of my mysql databases. I had backups for most of them but I'm missing an important one. the ibdata1 seems corrupted, so I had to rename the /var/lib/mysql directory and reinstall mariadb to get it running.

Now I'm trying to recover my missing database from frm and idb files. I found some articles like this one and how to achieve this : https://www.linkedin.com/pulse/how-restore-tables-from-ibd-file-priyanka-chouhan/

Issue is that trying to run mysqlfrm, all I get as a result is :

mysqlfrm --server=root:mypass@127.0.0.1 --port 3307 mytable.frm
# Source on 127.0.0.1: ...
Traceback (most recent call last):
  File "/usr/bin/mysqlfrm", line 345, in <module>
    servers = connect_servers(source_values, None, conn_options)
  File "/usr/lib/python2.7/dist-packages/mysql/utilities/common/server.py", line 487, in connect_servers
    source = get_server(src_name, src_dict, quiet, verbose=verbose)
  File "/usr/lib/python2.7/dist-packages/mysql/utilities/common/server.py", line 334, in get_server
    server_conn.connect()
  File "/usr/lib/python2.7/dist-packages/mysql/utilities/common/server.py", line 1065, in connect
    self.db_conn.set_charset_collation(charset=res[0][1])
  File "/usr/lib/python2.7/dist-packages/mysql/connector/abstracts.py", line 648, in set_charset_collation
    CharacterSet.get_charset_info(charset, collation)
  File "/usr/lib/python2.7/dist-packages/mysql/connector/constants.py", line 658, in get_charset_info
    info = cls.get_default_collation(charset)
  File "/usr/lib/python2.7/dist-packages/mysql/connector/constants.py", line 630, in get_default_collation
    raise ProgrammingError("Character set '%s' unsupported." % (charset))
mysql.connector.errors.ProgrammingError: Character set 'utf8mb3' unsupported.

Any idea how I could get rid of this error in order to recover my table structures from the frm files ? Or any other tool than mysqlfrm that could achieve that ?

Thanks a lot. Any Support would be greatly appreciated.

3
  • Unfortunately, mysqlfrm (and all the tools in MySQL Utilities) were discontinued in 2018, long before the utf8mb3 character set name was introduced in MySQL or MariaDB. So that tool probably will never understand that name for that character set. For that matter, Python 2.7 has also been deprecated for over two years. At this point, you're trying to use outdated tools to do this data recovery. Sorry, you are in uncharted waters. Jun 17 at 22:38
  • Thanks for your answer. Are there any other more recent tools I could use to recover data from frm and idb files ?
    – bbdoc
    Jun 17 at 22:41
  • I am not aware of any. MySQL 8.0 doesn't use .frm files anymore. I don't know of any tools for MariaDB, sorry. Jun 17 at 22:52

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy