2023-09-19 18:44:20 +08:00
|
|
|
-- 创建管理员登录表
|
|
|
|
CREATE database if NOT EXISTS router;
|
|
|
|
USE router;
|
|
|
|
-- 创建用户登录密码表
|
2023-09-20 16:10:47 +08:00
|
|
|
CREATE TABLE if not exists users (
|
2023-09-19 18:44:20 +08:00
|
|
|
id INT AUTO_INCREMENT PRIMARY KEY,
|
|
|
|
username VARCHAR(50) NOT NULL,
|
|
|
|
password VARCHAR(255) NOT NULL
|
|
|
|
);
|
|
|
|
-- 创建ARP映射表
|
2023-09-20 16:10:47 +08:00
|
|
|
CREATE TABLE if not exists ip_mac(
|
2023-09-19 18:44:20 +08:00
|
|
|
id INT AUTO_INCREMENT PRIMARY KEY,
|
|
|
|
ip VARCHAR(50) NOT NULL,
|
|
|
|
mac VARCHAR(50) NOT NULL
|
|
|
|
);
|
|
|
|
-- 创建防火墙表
|
2023-09-20 16:10:47 +08:00
|
|
|
CREATE TABLE if not exists ip_fw(
|
|
|
|
id INT AUTO_INCREMENT PRIMARY KEY,
|
|
|
|
ip VARCHAR(50) NOT NULL
|
|
|
|
);
|