-- Create USER

-- CREATE USER 'user1'@localhost IDENTIFIED BY 'password1';

CREATE USER blog_admin@'%' IDENTIFIED BY 'pass@1234';

GRANT ALL PRIVILEGES ON blogDB.* TO blog_admin@'192.168.0.%';
GRANT ALL PRIVILEGES ON blogDB.* TO blog_admin@'10.1.0.%';

SHOW GRANTS FOR blog_admin@'%';

FLUSH PRIVILEGES;

-- Create Counter Table

-- DROP TABLE PostVisitCounter

-- DROP TABLE PostLikeCounter

-- create table PostVisitCounter (Id INT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY, SiteId nvarchar(500), PostId nvarchar(500), Count INT(20), DateCreated TIMESTAMP, DateModified TIMESTAMP);

-- create table PostLikeCounter (Id INT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY, SiteId nvarchar(500), PostId nvarchar(500), Count INT(20), DateCreated TIMESTAMP, DateModified TIMESTAMP);