Welcome Guest, Not a member yet? Register   Sign In
Database error occurred.
#1

(This post was last modified: 06-24-2015, 01:10 AM by capt.enos.)

Hi, I'm newbie for this framework, i has tried many ways to fix this problem but still database not connected/error.
so, i need help.
screen looks like this :

A Database Error Occurred
SQLSTATE[28000] [1045] Access denied for user 'root'@localhost (using password: NO)
Filename: third_party/MX/Base.php
Line Number: 55

what should i do for this error?
please help me.

Thanks.
Reply
#2

Anyone can help?
i still can't connect codeigniter to mysql,


A Database Error Occurred

SQLSTATE[28000] [1045] Access denied for user 'root'@localhost (using password: NO)

Filename: third_party/MX/Base.php

Line Number: 55

Please help me.
thanks.
Reply
#3

Are the db credentials properly set in /application/config/database.php? Does that mysql user have proper permissions set up? According to the error message, you are trying to use the "root" mysql user with NO password.
Reply
#4

(06-24-2015, 09:00 AM)CroNiX Wrote: Are the db credentials properly set in /application/config/database.php? Does that mysql user have proper permissions set up? According to the error message, you are trying to use the "root" mysql user with NO password.

Finaly i can access database, but i got new error,

A Database Error Occurred
Error Number: 1146
Table 'cpp_db.UI_USERS' doesn't exist
select SALT as RESULT from UI_USERS where USERNAME='admin'
Filename: helpers/system_helper.php
Line Number: 153

I open file helpers/system_helper.php and i change all UI_USERS to lowercase because in my database all table is in lowercase, after i changed it nothing happen still same error.

by the way thanks for your answer. i appreciate it.
Reply
#5

(06-24-2015, 06:11 PM)capt.enos Wrote: Finaly i can access database, but i got new error,

A Database Error Occurred
Error Number: 1146
Table 'cpp_db.UI_USERS' doesn't exist
select SALT as RESULT from UI_USERS where USERNAME='admin'
Filename: helpers/system_helper.php
Line Number: 153

I open file helpers/system_helper.php and i change all UI_USERS to lowercase because in my database all table is in lowercase, after i changed it nothing happen still same error.

by the way thanks for your answer. i appreciate it.

Most databases don't care about the case for table and column names, but it is a good idea to be consistent. This error is pretty straight-forward, though. Are you sure the UI_USERS table exists in the database named cpp_db? Does the user have permission to access this table in this database?

In general, when trying to setup a site with code that already works for someone else, I start with the assumption that the error is in the configuration, and don't touch code until I'm absolutely certain that I've covered all of the potential configuration issues.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB