0

I migrated my OpenCart store from XAMPP locally to my remote server online. I followed these steps

But now I get this message in Google Chrome:

Warning: mysqli::mysqli() [mysqli.mysqli]: (28000/1045): Access denied for user 'root'@'localhost' (using password: NO) in /home/loginname/public_html/system/database/mysqli.php on line 6

Fatal error: Uncaught exception 'ErrorException' with message 'Error: Could not make a database link (1045) Access denied for user 'root'@'localhost' (using password: NO)' in /home/loginname/public_html/system/database/mysqli.php:9 Stack trace: #0 /home/loginname/public_html/vqmod/vqcache/vq2-system_library_db.php(13): DBMySQLi->__construct('localhost', 'root', '', 'opencart') #1 /home/loginname/public_html/index.php(44): DB->__construct('mysqli', 'localhost', 'root', '', 'opencart') #2 {main} thrown in /home/mailcoo2/public_html/system/database/mysqli.php on line 9

I have added a new user in the database other than root and used my url instead of localhost. It mentioned in the error message vqmod, so I am thinking I also have some sort of vqmod extension conflict. Where do I go from here? How do I configure the remote site for the MySQL database? Thanks.

Jay Gilford
  • 15,141
  • 5
  • 37
  • 56
Martin H
  • 29
  • 2
  • 3

1 Answers1

0

The problem is you're still using the user root without a password online. You need to edit the database credentials in both the config.php file and admin/config.php file with the details of your online server. In future you should always omit these from uploading to ensure you don't get the same error when you overwrite the files

Jay Gilford
  • 15,141
  • 5
  • 37
  • 56
  • I changed the credentials in the config.php files, and now I get a different error message - reflecting the new user name @ host and (using password: YES). – Martin H Sep 04 '14 at 01:11
  • @MartinH - in that case, you are still using the wrong credentials or the user isn't set up properly and you will need to contact your hosting company to figure out the exact cause of the Access denied message – Jay Gilford Sep 04 '14 at 01:45