I have an Ubuntu 16.04 server I want to upgrade to Ubuntu 20.04. That comes with MySQL 8, but I am not ready for that yet. I have found examples on how to remove MySQL 8 and install MySQL 5.7, and have done that successfully. But how to I migrate my data? I have dozens of databases.
Obviously when the Ubuntu 20.04 upgrade runs and includes MySQL 8, it upgrades the data to be compatible with it. Swapping in MySQL 5.7 obviously won't downgrade it. I tried copying the /var/lib/mysql contents, then moving them back in after the upgrade/downgrade, but MySQL won't connect. Probably I might need to be more selective? ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
The username and permissions match what was in my old server. It is the mysql user. Here is the error information from the log:
2021-01-27T22:55:18.309052Z 0 [ERROR] [FATAL] InnoDB: Table flags are 0 in the data dictionary but the flags in file ./ibdata1 are 0x4000! 2021-01-27 22:55:18 0x7f5e14b0d740 InnoDB: Assertion failure in thread 140042050787136 in file ut0ut.cc line 921 InnoDB: We intentionally generate a memory trap. InnoDB: Submit a detailed bug report to http://bugs.mysql.com. InnoDB: If you get repeated assertion failures or crashes, even InnoDB: immediately after the mysqld startup, there may be InnoDB: corruption in the InnoDB tablespace. Please refer to InnoDB: http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html InnoDB: about forcing recovery. 22:55:18 UTC - mysqld got signal 6 ; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. Attempting to collect some information that could help diagnose the problem. As this is a crash and something is definitely wrong, the information collection process might fail. key_buffer_size=8388608 read_buffer_size=131072 max_used_connections=0 max_threads=151 thread_count=0 connection_count=0 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 68196 K bytes of memory Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x0 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... stack_bottom = 0 thread_stack 0x40000 /usr/sbin/mysqld(my_print_stacktrace+0x3b)[0x56457cddebeb] /usr/sbin/mysqld(handle_fatal_signal+0x377)[0x56457c6a1977] /lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0)[0x7f5e150663c0] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7f5e14b5818b] /lib/x86_64-linux-gnu/libc.so.6(abort+0x12b)[0x7f5e14b37859] /usr/sbin/mysqld(+0x6aacec)[0x56457c677cec] /usr/sbin/mysqld(_ZN2ib5fatalD1Ev+0x66)[0x56457d120ed6] /usr/sbin/mysqld(+0x120025b)[0x56457d1cd25b] /usr/sbin/mysqld(+0x12007ed)[0x56457d1cd7ed] /usr/sbin/mysqld(Z6fil_ioRK9IORequestbRK9page_id_tRK11page_size_tmmPvS8+0x322)[0x56457d1d9962] /usr/sbin/mysqld(_Z13buf_read_pageRK9page_id_tRK11page_size_t+0xdd)[0x56457d18c6cd] /usr/sbin/mysqld(_Z16buf_page_get_genRK9page_id_tRK11page_size_tmP11buf_block_tmPKcmP5mtr_tb+0x475)[0x56457d15e325] /usr/sbin/mysqld(_Z31trx_rseg_get_n_undo_tablespacesPm+0x14f)[0x56457d0ff42f] /usr/sbin/mysqld(+0x10f96b8)[0x56457d0c66b8] /usr/sbin/mysqld(_Z34innobase_start_or_create_for_mysqlv+0x2e3d)[0x56457d0caa3d] /usr/sbin/mysqld(+0xfc431d)[0x56457cf9131d] /usr/sbin/mysqld(_Z24ha_initialize_handlertonP13st_plugin_int+0x4f)[0x56457c6f593f] /usr/sbin/mysqld(+0xbe68e5)[0x56457cbb38e5] /usr/sbin/mysqld(_Z40plugin_register_builtin_and_init_core_sePiPPc+0x1e5)[0x56457cbb6e05] /usr/sbin/mysqld(+0x6cccd0)[0x56457c699cd0] /usr/sbin/mysqld(_Z11mysqld_mainiPPc+0x786)[0x56457c69b3e6] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7f5e14b390b3] /usr/sbin/mysqld(_start+0x2a)[0x56457c69169a] The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains information that should help you find out what is causing the crash.
0 Answers