-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsockets_db.sql
30 lines (22 loc) · 927 Bytes
/
sockets_db.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
create schema python_sockets;
use python_sockets;
drop table login;
drop table action_logs;
show tables;
create table login (
id int not null auto_increment,
username varchar(32) not null,
psw text not null,
hash_check text not null,
primary key (id)
);
create table action_logs (
username_id int not null,
username varchar(32) not null,
act text not null,
foreign key (username_id) references login(id) on update cascade
);
insert into login (username, psw, hash_check) values ("admin",
"d82494f05d6917ba02f7aaa29689ccb444bb73f20380876cb05d1f37537b7892",
"d7c9be51056b8d631a3940a66c85fd7b180c1db12bff83d039eb0e89d2de8c33");
select * from login where username = "admin";