diff options
-rw-r--r-- | src/db.lua | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -23,10 +23,6 @@ luasql = require "luasql.mysql" -- for destination database -- CREATE DATABASE nop CHARACTER SET utf8 COLLATE utf8_unicode_ci; --- GRANT select,insert,update,delete ON nop.master TO 'nopsyncd'@'localhost' IDENTIFIED BY '<password>'; --- GRANT select,insert,update,delete ON nop.standby TO 'nopsyncd'@'localhost'; --- GRANT select,insert,update ON nop.state TO 'nopsysstated'@'localhost' IDENTIFIED BY '<password>'; --- GRANT select ON nop.* TO 'nop'@'localhost' IDENTIFIED BY '<password>'; -- USE nop -- CREATE TABLE IF NOT EXISTS master (timestamp BIGINT UNSIGNED PRIMARY KEY NOT NULL, cart INT NOT NULL, len INT, showtitle VARCHAR(255), title VARCHAR(255), artist VARCHAR(255), album VARCHAR(255), ismusic BOOLEAN); -- ALTER TABLE master CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci; @@ -34,6 +30,10 @@ luasql = require "luasql.mysql" -- ALTER TABLE standby CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci; -- CREATE TABLE IF NOT EXISTS state (timestamp BIGINT UNSIGNED PRIMARY KEY NOT NULL, state VARCHAR(32)); -- ALTER TABLE state CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci; +-- GRANT select,insert,update,delete ON nop.master TO 'nopsyncd'@'localhost' IDENTIFIED BY '<password>'; +-- GRANT select,insert,update,delete ON nop.standby TO 'nopsyncd'@'localhost'; +-- GRANT select,insert,update ON nop.state TO 'nopsysstated'@'localhost' IDENTIFIED BY '<password>'; +-- GRANT select ON nop.* TO 'nopro'@'localhost' IDENTIFIED BY '<password>'; local db = {} |