Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter\Database\Exceptions\DatabaseException #8
#1

Hello guys.

I'm new here and I don't have much experience with CodeIgniter. I'm having this problem when trying to connect to the database. I tried a few things that didn't work. I installed the MySQLi extension and configured the database in the .env file but that's it. I wonder if you guys could help me with this. Thank you.
Reply
#2

approach and method.

MySQli Maria come with user passwords grant permissions and all the stuff.

So you could start easy with sqlite3 database with is serverless meaning its just a file requiring no daemon process to make it work.You can create a sqlite3 database manually with tables and populate some data using :
https://sqlitebrowser.org

The sqlite file can be drag and dropped into "writable".

Then you need to make sure app/Config/Logger.php has maybe setting 9

make sure you have env

ENVIRONMENT
#--------------------------------------------------------------------

# CI_ENVIRONMENT = production

should be commented = development

Then you need to read the docs about configuring a model to use a table with allowed fields.

You can read logs at : writable/logs/ they will be dated with days date , open with text editor and post what they say .


if you want to try sqlite3 and get sqlitebrowser going let me know and will give you my settings
Reply
#3

Can you post the code how you are accessing the database?

If you have set properly the DB settings either in the config or in the .env, then gettings the db instance is as simple as
PHP Code:
$db db_connect(); 

You can read more on the user guide on how to access the database.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB