• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 195
  • Last Modified:

How to bulk-update structures of multiple MySQL databases (structurally cloned but with different data)

I am considering create an application on Google App Engine where each user will have their own MySQL database but the app itself will be hosted on one Google App Engine Account.

How do I go about making changes to the structure of each database in bulk if I want to say add a column?

Thanks...
0
Mark
Asked:
Mark
  • 3
  • 2
1 Solution
 
gheistCommented:
Say ALTER TABLE? It does not change depending on if you have a copy or clone or ex replica or mariadb...
0
 
Steve BinkCommented:
You would need to make an appropriate update script containing all your schema changes, then run that script for each database.  There is no "shortcut" to this...
0
 
MarkProgrammerAuthor Commented:
Are you sure? NaviCat has a structure synchronization feature which works well for me but it only supports copying to one server ..
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Steve BinkCommented:
That would be NaviCat scripting those changes.. a feature of that application, which is outside of MySQL.

In my office environment, we have an application running on 85 separate instances.  We have written our own infrastructure to push out schema changes.  It consists of bash scripts which iterate over all known instances and apply updates.

Yes, I am sure there is no way to accomplish this in MySQL.  There are, however, plenty of ways to use external to automate the changes.
0
 
MarkProgrammerAuthor Commented:
That's what I meant, an external application like NaviCat but that supports copying structures to multiple databases...
0
 
Steve BinkCommented:
A quick Google search on Navicat's command line shows limited options for scripting, though it seems possible.  I'm guessing you would use the data synchronization feature, but it appears you would need to create a profile.  There's also a "batch jobs" feature, but again, you'll need to create the jobs to batch.  That's still a bit of manual management of the task, which would become tedious if you have a large number of databases to sync.  

There are other options: http://blog.webyog.com/2012/10/16/so-how-do-you-sync-your-database-schema/.  As I said, my office uses some scripts built in-house to accomplish this, and it works wonderfully.  In our situation, the hard part is making the DDL script.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now