19 lines
517 B
MySQL
19 lines
517 B
MySQL
|
-- 创建管理员登录表
|
||
|
CREATE database if NOT EXISTS router;
|
||
|
USE router;
|
||
|
-- 创建用户登录密码表
|
||
|
CREATE TABLE users (
|
||
|
id INT AUTO_INCREMENT PRIMARY KEY,
|
||
|
username VARCHAR(50) NOT NULL,
|
||
|
password VARCHAR(255) NOT NULL
|
||
|
);
|
||
|
INSERT INTO users (username, password)
|
||
|
VALUES ('admin', 'admin');
|
||
|
-- 创建ARP映射表
|
||
|
CREATE TABLE ip_mac(
|
||
|
id INT AUTO_INCREMENT PRIMARY KEY,
|
||
|
ip VARCHAR(50) NOT NULL,
|
||
|
mac VARCHAR(50) NOT NULL
|
||
|
);
|
||
|
-- 创建防火墙表
|
||
|
CREATE TABLE ip_fw(ip VARCHAR(50) NOT NULL);
|