Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hello Guys, Today I have completed my PHP project and the problem is I have uploaded my site to my domain and I have import MySQL file also in database and I have to define everything in configuration file hostname username password and DB name
but when I open my site so am gettings some errors my site is not opening please help me guys, please
Thanks in Advance

What I have tried:

A PHP Error was encountered
Severity: Warning

Message: mysqli::real_connect(): (28000/1045): Access denied for user 'root1'@'localhost' (using password: YES)

Filename: mysqli/mysqli_driver.php

Line Number: 201

Backtrace:

File: /home/redbrick/cpc.redbricksgroup.com/panel/application/third_party/MX/Loader.php
Line: 109
Function: DB

File: /home/redbrick/cpc.redbricksgroup.com/panel/application/third_party/MX/Loader.php
Line: 65
Function: initialize

File: /home/redbrick/cpc.redbricksgroup.com/panel/application/third_party/MX/Base.php
Line: 55
Function: __construct

File: /home/redbrick/cpc.redbricksgroup.com/panel/application/third_party/MX/Base.php
Line: 60
Function: __construct

File: /home/redbrick/cpc.redbricksgroup.com/panel/application/third_party/MX/Controller.php
Line: 4
Function: require

File: /home/redbrick/cpc.redbricksgroup.com/panel/application/third_party/MX/Modules.php
Line: 123
Function: include_once

File: /home/redbrick/cpc.redbricksgroup.com/panel/application/core/MY_Controller.php
Line: 9
Function: spl_autoload_call

File: /home/redbrick/cpc.redbricksgroup.com/panel/index.php
Line: 315
Function: require_once

A Database Error Occurred
Unable to connect to your database server using the provided settings.

Filename: third_party/MX/Base.php

Line Number: 55
Posted
Updated 12-Jan-18 8:04am
Comments
ThilinaMD 12-Jan-18 13:59pm    
Access denied for user 'root1'@'localhost' (using password: YES) tells you that you have to use correct password for the db
Member 9983063 12-Jan-18 14:01pm    
you mean to say my DB password is wrong I have entered my configuration file
ThilinaMD 12-Jan-18 14:04pm    
yes. when creating a user in cpanel for database you have to create a password for that user use that pssaword to connect with db
Member 9983063 12-Jan-18 14:08pm    
i am using same that password in configuration file
Member 9983063 12-Jan-18 14:08pm    
but still am getting this errors please hep me

1 solution

Look at the error message:
Access denied for user 'root1'@'localhost'

How much clearer do you need it to be?

It probably isn't "localhost" but a "proper" name for the MySQL server, and "root1" is very unlikely to be the login name for a "normal" user application. Normal users don't need administrator access, and it's a bad idea to give it.

So start by looking at the connections string you sued when you imported your database to the production server - that probably holds the info you need. If not, contact your hosting service tech support and get it from them.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900