DEV Community

Discussion on: Learn Docker - from the beginning, part III databases and linking

Collapse
 
moinuddin14 profile image
Khaja Moinuddin Mohammed

Hi @chris can you add this line before "Let’s try to run our node app.js command again and this time we get this: node app.js",

create table with the name Customer before running node app.js with below command

CREATE DATABASE Customers;

without creating the db, i was getting error, but after creating the db it resolved.

I ain't sure if this is how it needs to be done, as am no expert with sql dbs. Please correct me if am wrong.

Collapse
 
bijoy26 profile image
Anjum Rashid

Fell into the same trap as well. Thanks for pointing it out.

Collapse
 
dragane profile image
Dragane • Edited

That is correct. We created the Customers database on the host mysql server but we left the container database untouched. Manual creation of the Customers database is required on the container.