This tutorial will explain how to establish a connection to MySQL database in Node.js
Use the following queries to build your database and tables
CREATE SCHEMA `tutorial` ;
CREATE TABLE `tutorial`.`student` (
`id` INT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(100) NULL,
`email` VARCHAR(100) NOT NULL UNIQUE,
PRIMARY KEY (`id`))
COMMENT = 'table for student';
INSERT INTO `tutorial`.`student` (`name`, `email`) VALUES ('Thamizharasan', '[email protected]');
INSERT INTO `tutorial`.`student` (`name`, `email`) VALUES ('Mohan', '[email protected]');
INSERT INTO `tutorial`.`student` (`name`, `email`) VALUES ('John', '[email protected]');
For the complete list of node.js tutorials check out the below playlist...
https://goo.gl/G83zA5