Replication Mysql Database

Asked

Viewed 150 times

1

I am drafting an online project and I need to ask a question regarding the creation of the database.

I will have a database COMPANIES containing the reference with name and a code.

From this COMPANIES bank I will want to generate a new database structure, but I do not want to have to create manually every time I register a new company to create the bank in the nail, there is a function I can do to replicate this structure by registering a new company?

1 answer

2


You can use this bank’s default dump by changing the name of the bank to a new company’s Lug.

Where once registered will be uploaded this dump in mysql.

ps.: I don’t know if the explanation is practical but I can try to improve a little case needed

  • But could I upload the dump by registering in the COMPANY table? Only using the Mysql database manager.

  • Interesting but there is some requirement to give a CREATE DATABASE from the outside because I never tried it, create all the databases through the database manager or phpmyadmin.

  • you simply separate a default dump and when you register for the application you open this dump for the application by changing the create database by the name you want and import. In the direct registration in the register, you can use a Trigger or store.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.