Commit cd6b3427 authored by Hugo Hörnquist's avatar Hugo Hörnquist
Browse files

Remove unneeded files from repo.

Remove information about VM.

Remove sqlite schema file

Remove create_init_data.sql

Remove domaindb.db sqlite database.
parent b3a1c2d1
LysNS SQL parts
===============
The debug MySql database is stored on an Virtual Machine
which is in the time of writing 2018-01-09located at
~hugo/VirtualBox VMs/LysMemberSQL
The `manage` script here is for starting, stopping and connecting
to that machine. SSH is also avalible.
Ports and Logins
----------------
Login:
Linux:
user: root
pass: password
MySQL:
user: lysns
pass: password
Ports:
- ssh
- local :: 22
- extern :: 2222
- mysql
- local :: 3306
- extern :: 2223
Other files in this directory
-----------------------------
- domaindb.db -- SQLite Database
......
INSERT INTO domain (name, uid)
values ("hornquist.se", 2278);
INSERT INTO domain (name, personid)
SELECT "porr", id FROM person WHERE username = "jiffe";
INSERT INTO domain (name, personid)
SELECT "jiffe.se", id FROM person WHERE username = "jiffe";
-- keys here?
INSERT INTO subdomain (name, domainid)
SELECT "@", id FROM domain
WHERE name = "hornquist.se" AND personid = (SELECT id FROM person WHERE username = "hugo");
DROP TABLE person;
DROP TABLE domain;
DROP TABLE mail;
DROP TABLE record_types;
CREATE TABLE person (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT,
username TEXT
);
CREATE TABLE domain (
id INTEGER PRIMARY KEY AUTOINCREMENT,
userid INTEGER,
name TEXT,
FOREIGN KEY(userid) REFERENCES person(id)
);
CREATE TABLE record_types (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT
);
INSERT INTO record_types (name),
("MX"),
("A"),
("AAAA");
CREATE TABLE subdomain (
id INTEGER PRIMARY KEY AUTOINCREMENT,
domainid INTEGER,
name TEXT,
ttl INTEGER,
rr INTEGER,
dest BLOB,
class TEXT,
FOREIGN KEY(domainid) REFERENCES domain(id),
FOREIGN KEY(rr) REFERENCES record_types(id);
);
CREATE TABLE keys (
id INTEGER PRIMARY KEY AUTOINCREMENT,
domainid INTEGER,
key BLOB,
secret BLOB,
FOREIGN KEY(domainid) REFERENCES domain(id)
);
#!/bin/bash
case $1 in
mysql)
mysql \
--host=127.0.0.1 \
--port=2223 \
--user=lysns \
--password=password \
lysns
;;
ssh)
echo "Password is 'password'"
ssh -p 2222 root@localhost
;;
start)
VBoxManage startvm LysMemberSQL --type headless
;;
stop)
VBoxManage controlvm LysMemberSQL poweroff
;;
*)
cat <<- EOF
==== USAGE =====
For arg 1 use:
mysql: connect to mysql on port 2223
ssh: ssh's into a root shell
start: start vm
stop: stop vm
EOF
;;
esac
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment