################################################################
# WARNING - DO NOT run this script against a production system #
# with LibData currently installed.			       #
################################################################

# Create libdata
CREATE DATABASE libdata;

# Create libstats
CREATE DATABASE libstats;

# Create libsession
CREATE DATABASE libsession;

# Insert users into mysql.user table
INSERT INTO mysql.user VALUES ('%', 'libsession', password('ch4ngeME'), 
 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N','N','N','N','N','N','N');
INSERT INTO mysql.user VALUES ('%', 'libdata', password('changEth1s'), 
 'Y', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'N','N','N','N','N','N','N');

# Insert database/users from mysql.db table
INSERT INTO mysql.db VALUES ('%', 'libsession', 'libsession', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'N', 'N', 'N', 'N');
INSERT INTO mysql.db VALUES ('%', 'libdata', 'libdata', 'Y', 'Y', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N');
