News:

AbanteCart v1.4.2 is released.

Main Menu
support

how to configer database

Started by ironmonger, February 01, 2017, 06:51:13 AM

Previous topic - Next topic

ironmonger

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

Basara

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

ironmonger

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

Forum Rules Code of conduct
AbanteCart.com 2010 -