i would like to change my database server to percona xtradb cluster (5.7 or 8)
Actually we use mariadb 10.5.9 and i am not able to import my mysql dump from mariadb to my new test-percona-node.
i receive for this:
seit date NOT NULL DEFAULT current_timestamp(),
ERROR 1067 (42000): Invalid default value for ‘seit’
Any Idea why it is working in mariadb and not in percona?
Helllo @AnPa ,
Current timestamp is not a function when used in create table. This is the proper way:
CREATE TABLE stuff (
id int UNSIGNED PRIMARY KEY AUTO_INCREMENT,
seit date NOT NULL DEFAULT CURRENT_TIMESTAMP
but it is a mysqldump from my actual mariadb server. What goes wrong that it makes bad dumps?
Perhaps a bug in maria’s mysqldump? Have you tried the dump binary from community? What about using mydumper?
now tryed with mydumper and restored with myloader. Same issue:
For the record and as shown in MariaDB versus MySQL - Compatibility - MariaDB Knowledge Base , there are some imcompabilities between different MariaDB and MySQL versions.
There is currently no information about MariaDB 10.5 to 5.7.
It might be possible to workaround the error by modifying some columns as my college suggested, but since there is no official support from MariaDB 10.5 to MySQL 5.7, chances are more errors can pop up.
I suggest trying to restore the dump from MariaDB 10.5 into MariaDB 10.4 or even MariaDB 10.3, then use mysqldump binary from MariaDB10.4 to restore on MySQL 5.7 and see if it works. You can do a mysqldump --no-data to dump schema only and do a fast test.
Do note that there are other incompatibilities between different MariaDB and MYSQL 5.7 version (described on the above link). The products have been diverging on every newer release and doing a migration back and forth is becoming more complex on recent versions, having to use intermediate servers for the migration