A Database Error 1146 in Codeigniter
<p>I am using Codeigniter framework to build a website. I am receiving this error:</p>

<pre><code>Error Number: 1146
Table 'users.ci_sessions' doesn't exist

SELECT `data` FROM `ci_sessions` WHERE `id` = '5e47bcb40c2954bd7329ff3fbcf253007a0563cc'

Filename: libraries/Session/drivers/Session_database_driver.php
Line Number: 166
</code></pre>

<p>Here is how session is defined:
In config.php:</p>

<pre><code>$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_table_name'] = 'ci_sessions';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = NULL;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;
$config['sess_encrypt_cookie']  = FALSE;
$config['sess_use_database']    = FALSE;
$config['sess_driver'] = 'database';       // changed from file
$config['sess_save_path'] = 'ci_sessions'; // table name
//$config['sess_save_path'] = sys_get_temp_dir();
$config['sess_match_ip']        = FALSE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update']  = 300;
$config['sess_use_database'] = TRUE;
</code></pre>

<p>In autoload.php:</p>

<pre><code>$autoload['libraries'] = array('database','session');
</code></pre>

<p>I have read <a href="https://ellislab.com/codeigniter/user-guide/libraries/sessions.html" rel="nofollow">https://ellislab.com/codeigniter/user-guide/libraries/sessions.html</a> and followed all steps to properly access the session. Any suggestion on how to fix above error? </p>