use sipstats;
set sql_log_bin=0;
set autocommit=0;

REVOKE SELECT,INSERT,UPDATE ON sipstats.call_info FROM 'mediator'@'localhost';

CREATE DATABASE stats;

ALTER TABLE sipstats.call_info RENAME stats.call_info;

GRANT SELECT,INSERT,UPDATE ON stats.call_info TO 'mediator'@'localhost';

commit;
