Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Having Difficulty with MySQL connection
07-22-2016, 03:09 AM
Post: #21
RE: Having Difficulty with MySQL connection
Good day Tim,

Below are the details of the webERP config.php

// assuming that the web server is also the sql server
$DBType = 'mysqli';
//assuming that the web server is also the sql server
$DBUser = 'root';
$DBPassword = '';

thanks
Find all posts by this user
Quote this message in a reply
07-22-2016, 06:57 AM
Post: #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
Visit this user's website Find all posts by this user
Quote this message in a reply
07-22-2016, 08:50 AM
Post: #23
RE: Having Difficulty with MySQL connection
Thanks, Phil

Yes, everything is on the same machine (web server and SQL)

I am not able to log into the SQL and PHPMyAdmin when I use port 3306, so I changed it to 3308.
The configuration is the same as your, the only change made was the Mysql port which was changed to 3308.

$host = 'localhost';
$mysqlport=3308;
//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';

$CompanyList[0] = array('database'=>'weberpdemo' ,'company'=>'WebERP Demo Company' );
$CompanyList[1] = array('database'=>'your_db' ,'company'=>'Your Company inc' );

Thanks
Find all posts by this user
Quote this message in a reply
07-22-2016, 08:54 AM
Post: #24
RE: Having Difficulty with MySQL connection
Hi, you have this in the section of your config.php you just quoted:

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

are they the correct for your mysql implementation?

Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
07-22-2016, 10:00 AM
Post: #25
RE: Having Difficulty with MySQL connection
Hi Tim,

I am lost, I really do not know if I did understand you, but MySql has the following

user = 'root'
password = ''

Was the question answered?
Find all posts by this user
Quote this message in a reply
07-22-2016, 12:26 PM (This post was last modified: 07-22-2016 12:27 PM by phil.)
Post: #26
RE: Having Difficulty with MySQL connection
Tim was referring to your note here which looked like you pasted your webERP config.php into the message and the $DBUser ='weberp_db_user'; and $DBPassword ='weberp_db_pwd'; is not going to work for you. You need to change these to $DBUser='root; and $DBPassword='';

(07-22-2016 08:50 AM)futuretech Wrote:  Thanks, Phil

Yes, everything is on the same machine (web server and SQL)

I am not able to log into the SQL and PHPMyAdmin when I use port 3306, so I changed it to 3308.
The configuration is the same as your, the only change made was the Mysql port which was changed to 3308.

$host = 'localhost';
$mysqlport=3308;
//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';

$CompanyList[0] = array('database'=>'weberpdemo' ,'company'=>'WebERP Demo Company' );
$CompanyList[1] = array('database'=>'your_db' ,'company'=>'Your Company inc' );

Thanks

Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Visit this user's website Find all posts by this user
Quote this message in a reply
07-22-2016, 03:59 PM
Post: #27
RE: Having Difficulty with MySQL connection
Thanks, Phil

Is the editing done before or after the installation?

I have two files with different settings, one comes with the webERP installation package and the other is automatically created after the installation

Before the installation
config.distrib.php
// sql user & password
$DBUser = 'weberp_db_user';
$DBPassword = 'weberp_db_pwd';

File created automatically after the installation
config.php
//assuming that the web server is also the sql server
$DBUser = 'root';
$DBPassword = '';

thanks.
Find all posts by this user
Quote this message in a reply
07-23-2016, 08:31 AM
Post: #28
RE: Having Difficulty with MySQL connection
Phil, Tim please help
Find all posts by this user
Quote this message in a reply
07-27-2016, 05:52 AM
Post: #29
RE: Having Difficulty with MySQL connection
I have never tried running it without a password and I wonder whether it is the empty password that is the problem.

I would try setting a password and updating your config.php with that password and see if that works.

Thanks
Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)