Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 03-30-2011 12:00:57

zoaib
Member
Registered: 03-30-2011
Posts: 6

DBI Connect Errro

Hello All, I am encountering this error when I am setting up my site on a new dev environment. I have grant access to root for all IP addresses. I have code in PHP which is connecting correctly to this data source. This  is the first time I am setting this up so any help will be appreciated. I have also run chmod 755 on the directory.

Script Execution Error
The following error was just encountered:

DBI connect('host=192.168.26.129;database=dbname','root',...) failed: Access denied for user 'root'@'192.168.26.129' (using password: YES) at /var/www/html/cgi-bin/ccp51/library/common/database.pl line 232

Thank you

Offline

 

#2 03-30-2011 12:15:30

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: DBI Connect Errro

Try using localhost for the host name instead of the IP address.  You appear to be doing this on a local machine based on that IP address so a host of % in the MySQL user table for root should work fine also.

Offline

 

#3 03-30-2011 12:16:19

zoaib
Member
Registered: 03-30-2011
Posts: 6

Re: DBI Connect Errro

I did, same error:

Script Execution Error
The following error was just encountered:

DBI connect('host=localhost;database=beacondata','root',...) failed: Access denied for user 'root'@'localhost' (using password: YES) at /var/www/html/cgi-bin/ccp51/library/common/database.pl line 232

Offline

 

#4 03-30-2011 12:40:25

larry
Member
Registered: 07-21-2003
Posts: 437

Re: DBI Connect Errro

did you set a password for root?     

are you using mysql?


Laurie Stephens




Offline

 

#5 03-30-2011 12:58:26

zoaib
Member
Registered: 03-30-2011
Posts: 6

Re: DBI Connect Errro

Yes I did, and yes I am using mySQL

Offline

 

#6 03-30-2011 13:05:33

larry
Member
Registered: 07-21-2003
Posts: 437

Re: DBI Connect Errro

create a php file in your root directory with this code.  change the settings for database, user, and password.

run it in the browser.  does it work?

Code:

<?php
$dbhost = 'localhost';
$dbuser = 'myusername';
$dbpass = 'mypassword';
$dbname = 'mydatabase';

$connection = mysql_connect( $dbhost, $dbuser, $dbpass);
if (!$connection ) {
  echo "
mysql_connect : " . mysql_error() . "<br />";
  echo "Error code :" . mysql_errno() . "</pre>";
  die('Error connecting to mysql');
}
if (!mysql_select_db($dbname)) {
  echo "
mysql_select_db : " . mysql_error() . "<br />";
  echo "Error code : " . mysql_errno() . "</pre>";
  die('Error selecting database');
}
echo 'Connection established';
mysql_close($connection);
?>

I just finished solving a php/mysql problem (3 days now), so I'm up to speed on debugging the darn thing...


Laurie Stephens




Offline

 

#7 03-30-2011 13:12:12

zoaib
Member
Registered: 03-30-2011
Posts: 6

Re: DBI Connect Errro

When I ran your script I got this message:

Connection established

Offline

 

#8 03-30-2011 13:16:18

zoaib
Member
Registered: 03-30-2011
Posts: 6

Re: DBI Connect Errro

I hope that I am making the changes at the right location which is altrdbms.csv, my files looks like this ; this is running on my local machine:

altrdbms_id,altrdbms_type,altrdbms_description,altrdbms_value,altrdbms_display_type,altrdbms_display_value,altrdbms_not_null
MYSQL_host,MYSQL,Host Name,localhost,TEXTBOX-REG,,Y
MYSQL_database,MYSQL,Database Name,beacondata,TEXTBOX-REG,,Y
MYSQL_username,MYSQL,Username,root,TEXTBOX-REG,,Y
MYSQL_password,MYSQL,Password,XXXXXX,PASSWORD,,Y
MYSQL_dbd,MYSQL,Perl Database Driver Module,DBD::mysql,DISPLAY,,Y
MYSQL_limit,MYSQL,SQL LIMIT Syntax,"LIMIT start, rows",DISPLAY,,N
MYSQL_top,MYSQL,SQL TOP Syntax,,DISPLAY,,N
MYSQL_num,MYSQL,SQL NUMERIC Syntax,INT(length),DISPLAY,,Y
MYSQL_text,MYSQL,SQL TEXT Syntax,TEXT,DISPLAY,,Y
MYSQL_like,MYSQL,SQL LIKE Syntax,LIKE,DISPLAY,,Y
MYSQL_altadd,MYSQL,SQL ALTER TABLE (ADD) Syntax,ALTER TABLE table ADD COLUMN column metadata,DISPLAY,,Y
MYSQL_altdel,MYSQL,SQL ALTER TABLE (DROP) Syntax,ALTER TABLE table DROP COLUMN column,DISPLAY,,Y
POSTGRE_host,POSTGRE,Host Name,localhost,TEXTBOX-REG,,Y
POSTGRE_dbname,POSTGRE,Database Name,,TEXTBOX-REG,,Y
POSTGRE_username,POSTGRE,Username,,TEXTBOX-REG,,Y
POSTGRE_password,POSTGRE,Password,,PASSWORD,,Y
POSTGRE_dbd,POSTGRE,Perl Database Driver Module,DBD:tongueg,DISPLAY,,Y
POSTGRE_limit,POSTGRE,SQL LIMIT Syntax,LIMIT rows OFFSET start,DISPLAY,,N
POSTGRE_top,POSTGRE,SQL TOP Syntax,,DISPLAY,,N
-- INSERT --

Offline

 

#9 03-30-2011 13:41:51

larry
Member
Registered: 07-21-2003
Posts: 437

Re: DBI Connect Errro

CCP51 is really old,  So I'm not sure you're going to get much help on the forum any more.  Any reason not to just use the current version of CCP  V 7.1.3?  It is very easy to manage and a lot simpler to install.


Laurie Stephens




Offline

 

#10 03-30-2011 13:43:43

zoaib
Member
Registered: 03-30-2011
Posts: 6

Re: DBI Connect Errro

can you guide me how to upgrade; will I loose any data?

Offline

 

#11 03-30-2011 14:32:55

larry
Member
Registered: 07-21-2003
Posts: 437

Re: DBI Connect Errro

you'll need to purchase the latest  version from kryptronic.  click the Shopping Cart Software  link at the top of this page.


Laurie Stephens




Offline

 

#12 03-30-2011 17:15:41

Graham
Member
Registered: 09-30-2004
Posts: 981
Website

Re: DBI Connect Errro

zoaib wrote:

can you guide me how to upgrade; will I loose any data?

When you run the importer it will copy all the current data from your existing 5.1 install ie products, options, customer details etc so you won't lose anything and the upgrade process should be seamless.

Last edited by Graham (03-30-2011 17:19:04)

Offline

 

Board footer