I want to create databases and users with CI programmatically. So far i have these 2 simple MySQL statements.
CREATE DATABASE `testdb` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
and
CREATE USER 'test_user'@'%' IDENTIFIED BY '***';
GRANT ALL PRIVILEGES ON * . * TO 'test_user'@'%' IDENTIFIED BY '***' WITH GRANT
OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0
MAX_USER_CONNECTIONS 0 ;
GRANT ALL PRIVILEGES ON `testdb` . * TO 'test_user'@'%';
Can those be converted to Active Record, or does CI provides its own way of creating users/tables? i search the docs and couldn't find anything...
EDIT: I do this as an intranet application so no worries about permissions