-- CVS ID: $Id: create_lams_11_db.sql,v 1.12.2.1 2007/06/07 01:28:36 jliew Exp $
  
SET FOREIGN_KEY_CHECKS=0;
DROP DATABASE IF EXISTS @dbname@;
CREATE DATABASE @dbname@ DEFAULT CHARACTER SET utf8;
SET FOREIGN_KEY_CHECKS=1;

--USE mysql;

--DELETE FROM user WHERE user='';
-- DELETE FROM user WHERE user IS NULL;

--DELETE FROM db WHERE user='';
-- DELETE FROM db WHERE user IS NULL;

--GRANT ALL PRIVILEGES ON *.* TO lams@localhost IDENTIFIED BY 'lamsdemo';
--REVOKE PROCESS,SUPER ON *.* from lams@localhost;

--The hostname below should be replaced with the actual host name
--GRANT ALL PRIVILEGES ON *.* TO lams@'hostname' IDENTIFIED BY 'lamsdemo';
--REVOKE PROCESS,SUPER ON *.* from lams@'hostname';

--GRANT ALL PRIVILEGES ON *.* TO lams@'%' IDENTIFIED BY 'lamsdemo';
--REVOKE PROCESS,SUPER ON *.* from lams@'%';

--FLUSH PRIVILEGES;

--GRANT ALL PRIVILEGES ON lams.* TO lams@localhost IDENTIFIED BY 'lamsdemo' WITH GRANT OPTION;
--The hostname below should be replaced with the actual host name
--GRANT ALL PRIVILEGES ON lams.* TO lams@'hostname' IDENTIFIED BY 'lamsdemo' WITH GRANT OPTION;
--GRANT ALL PRIVILEGES ON lams.* TO lams@'%' IDENTIFIED BY 'lamsdemo' WITH GRANT OPTION;
	
--FLUSH PRIVILEGES;

USE @dbname@;

SET FOREIGN_KEY_CHECKS=1;