USE mysql;
INSERT INTO mysql.user (Host, User, Password) VALUES('%', 'nbtscanner', PASSWORD('tg01'));
INSERT INTO mysql.user (Host, User, Password) VALUES('localhost', 'nbtscanner', PASSWORD('tg01'));
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 INSERT, UPDATE, DELETE ON nbtscanner.nbtscanner TO nbtscanner@"%" IDENTIFIED BY 'tg01';
