Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Having Difficulty with MySQL connection
07-22-2016, 06:57 AM,
#22
RE: Having Difficulty with MySQL connection
There are a couple other things to check - this is the config_dist.php template showing the various settings to connect to the database :

Code:
// Connection information for the database
// $host is the computer ip address or name where the database is located
// if the web server is also the database server then 'locahost'
$host = 'localhost';
$mysqlport=3306;
//The type of db server being used
//$DBType = 'postgres' - now DEPRECIATED;
//$DBType = 'mysql';
//$DBType = 'mysqli'; for PHP 5 and mysql > 4.1
$DBType = 'mysqli';


// sql user & password
$DBUser = 'weberp_db_user';
$DBPassword = 'weberp_db_pwd';

So it sounds like you have $DBUser and $DBPassword set correctly if you can connect to mysql with phpmyadmin using the same credentials.
Also though you need to check that the mysql server host is set correctly - is this on the same machine as the web-server - if so then it should be set to
$host = 'localhost';
Also, is mysql listening for incoming connections on port 3306 - check mysql docs.
Also and finally this may be your issue as noted by jtrick earlier in this thread - webERP is looking for a database that matches your selected company... if you are using the selection box to choose the company to login to the lines in the config.php similar to:
Code:
//Installed companies
$CompanyList[0] = array('database'=>'weberpdemo' ,'company'=>'WebERP Demo Company' );
$CompanyList[1] = array('database'=>'your_db' ,'company'=>'Your Company inc' );

So if you select the first option in the list i.e. 'WebERP Demo Company" in the config.php above, then the database element is "weberpdemo" and you must also have a directory (folder for windows jockeys) under the companies directory named weberpdemo - exactly the same as this config.php database name.

HTH
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Reply


Messages In This Thread
RE: Having Difficulty with MySQL connection - by phil - 07-22-2016, 06:57 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)