gerlists.blogg.se

Nodejs mysql
Nodejs mysql




nodejs mysql nodejs mysql

You will be prompted to enter the password. If you want to run the container with bash and play directly with MySQL, run the following command: docker container exec -it nodejs-mysql bashĪfter that, start the MySQL monitor as follows: mysql -u root -p Now you can access your database from the terminal and from your application.

  • Lastly, it creates a new database called emails_db.
  • It starts the MySQL database on port 3306.
  • nodejs mysql

    It pulls the image mysql:5.7 from DockerHub and then runs it.To avoid inconsistencies and installing new stuff on your machine, you will use the official Docker image for MySQL.īefore going any further, run the following command in your terminal: docker run -p 3306:3306 -name nodejs-mysql -e MYSQL_ROOT_PASSWORD=pass -e MYSQL_DATABASE=emails_db -d mysql:5.7






    Nodejs mysql