• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Migration of MySQL to MariaDB has lost all the keys.

 
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have migrated my MySQL to MariaDB. The data has gone across however, I have lost all the keys (primary, foreign, etc). Is there a way to recover the keys without having to manually reset them for all 110 tables please?

Kind regards,

Glyn
 
Glyndwr Bartlett
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I simply re-imported it from the MySQL backup. Seems to have worked.
 
Saloon Keeper
Posts: 28580
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One of the very first things I learned on-the-job in IT is that it's usually not a good idea to create keys at the same time you're loading tables. Since keys are often kept in some sort of balanced tree, the continual re-balancing that comes from seeing a stream of keys come in en masse can really slow down the loading.

Although in your case, I think key creation failed outright.

If you didn't delete the previous load before running again, then the key creation process probably had existing data to work on, and it's a lot more efficient to build a keyset from a loaded table.

This is just a rough guess and there almost certainly have been some error messages that should have come out of the load, but as long as you got your import done properly, it's not important.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic