1

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?

1

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.