I am working on nodejs project. I have following mysql dump file. Rather go on and creating that table manually and feed data manually using mysql queries, I want to execute following dump file which will create the table and feed/insert the data in that table. How can I do that with command?
CREATE TABLE employees (
id int(11) NOT NULL AUTO_INCREMENT,
name varchar(50),
location varchar(50),
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
INSERT INTO employees (id, name, location) VALUES
(1, 'Jasmine', 'Australia'),
(2, 'Jay', 'India'),
(3, 'Jim', 'Germany'),
(4, 'Lesley', 'Scotland');
UPDATE
I want something similar in node js like below is in Ruby on rails
Populating database using seeds.rb
Or in Laravel is here