| Issue 3495: | Migration from H2 database to MySQL | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Hello, Is there any way/utility for migrating H2 database to the new MySQL database with all changes/users/ssh keys? Tried to export tables to csv by call CSVWRITE and import to MySQL but with no success. New Gerrit site ignore new imported changes and fail to add new changes because of duplicate entry (gerrit try to add new entry that already exist in MySQL) So I tried importer plugin but this plugin import only projects, changes and groups and not users and ssh keys. In connection with the increased workload I have to go to the new infrastructure which includes slaves, and the main obstacle is a database migration.
Nov 11, 2015
#1
coll...@gmail.com
Nov 11, 2015
Thanks, I have already solved it too, export with jdbc connector to backup.sql, after that with script: renaming tables, changing syntax to MySQL, replacing characters in comments that mysql not support like \\, ''), ')), etc. set autoincrement like this: ALTER TABLE account_group_id AUTO_INCREMENT=1079; ALTER TABLE change_message_id AUTO_INCREMENT=5963; ALTER TABLE account_id AUTO_INCREMENT=1002697; ALTER TABLE change_id AUTO_INCREMENT=58503; Truncating tables on target MySQL server and import with Workbench |
|
| ► Sign in to add a comment |