Jump to content

- - - - -

Error-Unable to connect DB server

connect database

  • Please log in to reply
4 replies to this topic

#1   Anusha

  • Members
  • 1 posts
  • Real Name:Anusha

Posted 02 August 2016 - 16:36


I created my website in localhost and is working fine. After web hosting, I am getting the following error.


Unable to connect to database server!


I updated the configure.php as below:


define('DB_SERVER', '');

  define('DB_SERVER_USERNAME', 'hosur513_admin');
  define('DB_SERVER_PASSWORD', 'admin123');
  define('DB_DATABASE', 'hosur513_anugraha');
  define('USE_PCONNECT', 'false');
  define('STORE_SESSIONS', 'mysql');
  define('CFG_TIME_ZONE', 'Indian/Mahe');
Please help.

#2   Jack_mcs

  • Members
  • 28,382 posts
  • Real Name:Jack
  • Gender:Male

Posted 02 August 2016 - 17:41

The database credentials for localhost, which I assume you mean a local server, will be different than a live server. You need to set up the database on the live server and use those credentials for the configure file.

#3   peterindexed


    PHP developer

  • Members
  • 1 posts
  • Real Name:Peter Sørensen
  • Gender:Male
  • Location:Denmark

Posted 20 September 2016 - 19:30

year, just update the config with the localhost credentials

love developing so made my own cool webshop

#4   ecommunlimited

  • Members
  • 268 posts
  • Real Name:William G. Sibert
  • Gender:Male
  • Location:Newark, Ohio USA

Posted 21 September 2016 - 12:09

You really shouldn't make posts with your database Username, Password and the name of your database. You should change the immediately. Everything you post on here goes on Google and other search engines. This site gets crawled just like all other sites. You should change the name of your admin as well.

#5   sharris

  • Members
  • 3 posts
  • Real Name:Scott Harris
  • Gender:Male

Posted 27 March 2017 - 16:28

Try opening services.msc from the start menu search box and try manually starting the MySQL service.