title: Codeigniter,create tables and users for MySQL
body: <p>I want to create databases and users with CI programmatically. So far i have these 2 simple MySQL statements.</p>
  
  <pre><code>CREATE DATABASE `testdb` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>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'@'%';
  </code></pre>
  
  <p>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...</p>
  
  <p><strong>EDIT</strong>: I do this as an intranet application so no worries about permissions</p>