Author Topic: how to configer database  (Read 5664 times)

Offline ironmonger

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
how to configer database
« 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

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5798
  • Karma: +274/-2
    • View Profile
Re: how to configer database
« Reply #1 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

Offline ironmonger

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: how to configer database
« Reply #2 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

 

Powered by SMFPacks Social Login Mod