USE mysql;
INSERT INTO mysql.user (Host, User, Password) VALUES('%', 'nbtscanner', PASSWORD('qugx8M!S'));
INSERT INTO mysql.user (Host, User, Password) VALUES('localhost', 'nbtscanner', PASSWORD('qugx8M!S'));
FLUSH PRIVILEGES;

CREATE DATABASE nbtscanner;
USE nbtscanner;
CREATE TABLE nbtscanner (
	ip CHAR(16) NOT NULL,
	hostname CHAR(32),
	fileservername CHAR(32),
	groupname CHAR(32),
	PRIMARY KEY (
		ip
	)
);
GRANT SELECT, INSERT, UPDATE, DELETE ON nbtscanner.nbtscanner TO nbtscanner@localhost IDENTIFIED BY 'qugx8M!S';
GRANT SELECT, INSERT, UPDATE, DELETE ON nbtscanner.nbtscanner TO nbtscanner@"%" IDENTIFIED BY 'qugx8M!S';
