WHAT'S NEW?
Loading...

Deploy MySQL database with application for production purpose (From development to production environment)

We have developed an application that uses the MySQL database. It's fine until we are in the development machine. But when the application is needed to deploy in other machines, then here are steps to do so.

  1. First download the MySQL package (.zip) package that requires no installation. The (.msi) installer package can also be used for the installation. If (.msi) installer is used then it is not necessary to install the MySQL service as the installation does. i.e. skip step 2, 3, 4 and 5.
  2. Unzip the package to a location like C:\Program Files\ and go the directory bin inside the MySQL package.
  3. Install the MySQL service by the command
    mysqld --install
  4. This installs a MySQL service named MySQL on your computer. To start the service, type the following command
    sc start MySQL
  5. This starts the MySQL service and it is set to automatic start-up by default.
  6. Export the database from the development machine to a sql file.
  7. Now create a user same as that in the development machine. Grant all privileges to this user.
  8. Create a database that was exported to the sql file from the development machine.
  9. Now go to the database by command
    USE database_name
  10. Now import the sql file. There are a number of executions and finally you are ready to execute your application.
This is how you can deploy the MySQL database from development environment to production environment.

0 comments:

Post a Comment