AbanteCart Community

Shopping Cart Operations => Support => General Support => Topic started by: ironmonger on February 01, 2017, 06:51:13 AM

Title: how to configer database
Post by: ironmonger on February 01, 2017, 06:51:13 AM
I have had to move servers and I have reloaded my site from a back up, but im getting this message

Cannot establish database connection. Check your database setting in configuration file. in /home/olivebranch/public_html/s/core/database/amysqli.php on line 50
When I go to line 50 I see this

    */
    public function __construct($hostname, $username, $password, $database, $new_link=false) {
      $connection = new mysqli($hostname, $username, $password, $database);
      if ($connection->connect_error) {
         $err = new AError('Cannot establish database connection to ' . $database.' using ' . $username . '@' . $hostname);
         $err->toLog();
            throw new AException(AC_ERR_MYSQL, 'Cannot establish database connection. Check your database setting in configuration file.');
       }


I can not see what to edit
I have all the database log in details


Please help
Title: Re: how to configer database
Post by: Basara on February 01, 2017, 07:24:02 AM
Hi.

Double check database server credentials in system/config.php file
Do not forget about database prefix

And check this guide http://docs.abantecart.com/pages/tips/change_domain.html
Title: Re: how to configer database
Post by: ironmonger on February 01, 2017, 08:39:55 AM
Thanks for the prompt reply, unfortunately the details all check out

unfortunately the old hosting site is not available so I cant make another backup.  any other suggestions, the data base is all there when I check phpmysql