CQRLog restore of .config directory on new machine MySQL cannot connect

3 posts / 0 new
Last post
ab4en
CQRLog restore of .config directory on new machine MySQL cannot connect

Apologies if there is something obvious I'm missing here but my google-fu is failing me.

I've rebuilt my linux box using Ubuntu 20.04. Before hand I backed up my `.config/cqrlog` directory. Now when reinstalling it and copying that directory into place it is unable to connect to MySQL. I've reinstalled a few different ways and at some point I found a recommendation to install mariadb 10.3 instead but that resulted in the same errors.

On the new installation the version of mysql is `mysql Ver 8.0.21-0ubuntu0.20.04.3 for Linux on x86_64 ((Ubuntu))`.

I get the error `TMySQL57Connection: Server connect failed`

Looking at the error logs it appears I was using an older version of MySQL on my old machine as the stats tables appear to be out of sync:

2020-07-31T00:26:49.135272Z 0 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
2020-07-31T00:26:49.135314Z 0 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
2020-07-31T00:26:49.135325Z 0 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
2020-07-31T00:26:49.135334Z 0 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
2020-07-31T00:26:49.135343Z 0 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
2020-07-31T00:26:49.135353Z 0 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_host_by_event_name' has the wrong structure
2020-07-31T00:26:49.135363Z 0 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
2020-07-31T00:26:49.135373Z 0 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure
2020-07-31T00:26:49.135382Z 0 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_user_by_event_name' has the wrong structure
2020-07-31T00:26:49.135392Z 0 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_account_by_event_name' has the wrong structure
2020-07-31T00:26:49.135401Z 0 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure

2020-07-31T00:26:49.999193Z 3 [ERROR] InnoDB: Table `mysql`.`innodb_table_stats` not found.
2020-07-31T00:26:49.999217Z 3 [ERROR] InnoDB: Fetch of persistent statistics requested for table `cqrlog002`.`db_version` but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
2020-07-31T00:26:51.043265Z 3 [ERROR] InnoDB: Table `mysql`.`innodb_table_stats` not found.
2020-07-31T00:26:51.043328Z 3 [ERROR] InnoDB: Fetch of persistent statistics requested for table `cqrlog002`.`freqmem` but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
2020-07-31T00:26:51.106357Z 3 [ERROR] InnoDB: Table `mysql`.`innodb_table_stats` not found.
2020-07-31T00:26:51.106382Z 3 [ERROR] InnoDB: Fetch of persistent statistics requested for table `cqrlog002`.`profiles` but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
2020-07-31T00:26:59.994451Z 0 [ERROR] InnoDB: Table `mysql`.`innodb_table_stats` not found.
2020-07-31T00:26:59.994515Z 0 [Warning] InnoDB: Recalculation of persistent statistics requested for table `cqrlog002`.`dxcc_id` but the required persistent statistics storage is not present or is corrupted. Using transient stats instead.

Is there a recommended approach to get the stats tables into the correct shape?

Thanks, 73,

-Ben - AB4EN

oh1kh
CQRLog restore of .config directory on new machine MySQL cannot

Hi Ben!

Copying ~/.config/cqrlog may not work when you upgrade. It works as backup/restore/duplicate for same Linux version it is from.
Using mysqldump to backup all databases and restore them to different version of Mysql (or MariaDB) is the way.

Can you go back to old setup and do mysqldump there? Then restore the dump to new system.
You will found some threads about mysqldump from this forum.

I think that would be the easiest way if even Google-fu does not give better advise.

--
Saku
OH1KH

ab4en
Saku,

Saku,

Thanks for the advice! Luckily I have the old drive still un-wiped. I've booted back into it but `mysqldump` is currently failing and I'm trying to debug that. Answers on the internet seem to suggest that `mysql_upgrade` should fix the issue but so far that hasn't worked for me.

I'll continue to work on it now that you've put me on the right path. Thanks!

73,
-Ben, AB4EN

--
Ben AB4EN