Post by mememe » Tue Mar 14, 2017 6:22 am

Seems this has been asked many times but with no definitive answer or one that makes sense to me!, I hope someone can help, desperately need my site live!

Getting this error from uploading my site to my host from my computer, site works fine on my computer until its uploaded with the sql database then get the error message

Warning: mysqli::__construct(): (28000/1045): Access denied for user 'admin'@'localhost' (using password: YES)

Permissions for the 2 config files are 444 (tried 744 as some pages suggest also) and have the updated paths, which as far as im aware are correct.

Please help!!!


Fri Apr 01, 2016 3:44 am

Post by victorj » Wed Mar 15, 2017 6:03 am

Your opencart install has no access to database.
possible errors:
1 config files donat have correct database information.
2 database not configured properly
2 database user does not have correct permissions to access and or edit database.

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Eigen productie en snelle levering.

User avatar


Sat Jun 25, 2011 4:09 am
Location - Alkmaar Holland

Post by mememe » Wed Mar 15, 2017 8:15 am

Ok, following this section...
After creating new MySQL database you have to assign a user to it. You create a new user in the MySQL® Databases section of cPanel and make sure that it has the same name and password as those you used in your project (the one you downloaded from subfolder in step 2). If you create a new user with a new database password chances are that you’ll get an error “Access denied for user…” at the end of the process.
which is the error im getting.

in thie original config files on my offline (working) site, this is set as
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'root');
define('DB_PASSWORD', 'root');

in the uploaded site these username and password in the config files need to be changed to the ones set for the newly setup database user?
In the original offline site, I have a saved root username and password different from 'root', pretty sure this was setup when the original OC was setup the first time.

Doesnt work leaving the uploaded config files user and pass to root either.

What am i missing?

Its taken nearly a year to finish my site and populate the database, this is falling flat on its face at the finish line :(
Im not a coder or web designer, I just dont understand this bit...


Fri Apr 01, 2016 3:44 am

Post by cyclops12 » Wed Mar 22, 2017 2:34 am

When you set up your new database on your server you will have setup a username and password
This should be the details you need to update the config files in your site which you have moved/copied to server


Sun Sep 27, 2015 1:10 am
Who is online

Users browsing this forum: racer7117 and 20 guests