Backup (MariaDB) Database and restore to different Host error

Backup (MariaDB) Database and restore to different Host error

avatar

I'm trying to Backup some RDM database from a primary MariaDB Server:
version | 10.3.29-MariaDB-0ubuntu0.20.04.1

to a secondary server where I have a newer version on MariaDB:
version | 10.6.3-MariaDB-log

I used for the backup\restore procedure this command that performs a remote backup and a restore on local server:

mysqldump -h {production-host} -u {production-user} -p{production-password} -R -E -d {db-name} | sudo mysql -u {dev-user} -p{dev-password} -D {db-name}

The command works fine, and the local DB is populated with data from remote host\db, but when I try to connect to DataSource with RDM - I have this error:
forum image
The user I'm using to connect to the DB have HIGH privileges on Database...
How can I solve this?
THX
P.

All Comments (2)

avatar

The remove the -d switch from the mysqldump command as it will skip the data.

This is why RDM, in the UI above, you see Current version: 0 as we query the table but it's empty or value 0.

Note, I would also explicitly add --triggers. It is not necessary as the default is enabled but it serves as a reminder that triggers should be/are also scripted.

mysqldump -h {production-host} -u {production-user} -p{production-password} -R --triggers {db-name} | sudo mysql -u {dev-user} -p{dev-password} -D {db-name}


--no-data, -d

Do not write any table row information (that is, do not dump table contents). This is useful if you want to dump only the CREATE TABLE statement for the table (for example, to create an empty copy of the table by loading the dump file).


Edit: Note you can also remove the -E, since RDM doesn't use any Events

Best regards,

Stéfane Lavergne

avatar

ThX. works!