#mariaDB COMMANDS sudo mysql -u root = start mariadb sudo systemctl status mariadb sudo systemctl start mariadb sudo systemctl restart mariadb sudo systemctl enable mariadb
#CREATE DATABASE database_name; #SHOW DATABASES; #USE database_name; #SHOW TABLES; #DESCRIBE table_name;
#sudo netstat -tuln | grep 3306 #sudo lsof -i:3306 #sudo kill 737026
First, create a MySQL database named student_management_system.
CREATE DATABASE student_management_system;
Create a table named students having the following fields:
id (INT, AUTO_INCREMENT, PRIMARY KEY)
name (VARCHAR)
age (INT)
grade (VARCHAR)
CREATE TABLE students (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL,
age INT NOT NULL,
grade VARCHAR(255) NOT NULL
);
Create a new folder for your project and initialize it with npm:
npm init -y
Install required dependencies:
npm install express mysql body-parser
Create an index.html file for the user interface.
Create a styles.css file to style your HTML interface as needed.
Create a script.js file to handle client-side interactions.
Create a server.js file to handle server-side logic.
Start the Node.js server:
node server.js
Now, you can access your student management system by opening http://localhost:3000 in your web browser.
sudo netstat -tuln | grep 3306 sudo lsof -i:3306 sudo kill 737026
sudo apt update sudo apt install nodejs
npm -v
mkdir my-node-project cd my-node-project
npm init
npm install express
const express = require('express');
const app = express();
const port = 3000;
app.get('/', (req, res) => {
res.send('Hello World!');
});
app.listen(port, () => {
console.log(Server is listening at http://localhost:${port}
);
});
node app.js