remote db initialization in Flask application
Question: I have flask app running on Server-A with mysqlDB. Before using the app we did
something like this:

    
    
    $ python -c "from your_app import db; db.create_all()"
    

to initialize the DB. Now we are planning to move DB to a new server,
Server-B. So the app will be running at Server-A and its mysql DB will be at
Server-B. In this case, how do I need to initialize the database? And where do
I need to execute the `create_all()` command? Does Server-B need any Flask
specific mysql packages?


Answer: Assuming that you have updated the application's database connection
information so that `db` now points at the MySQL database on Server B you
should be able to use the exact same command on Server A. Whatever you are
using to create the tables should still create the necessary tables in the
database on Server B.

