Zen Cart Logo
Forums / Installing on a Windows Server / 0 Db_error_not_connected

0 Db_error_not_connected

Locked

Views: 10,273

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
24 Jul 2006, 2:50 AM
#1
czone avatar

czone

New Zenner

Join Date:
Jul 2005
Posts:
16
Plugin Contributions:
0

0 Db_error_not_connected

I'm trying to take a two server configuration (1 Web server & 1 DB Server) and change it to a single server configuration (web & db on same server).

I've moved the DB over successfully and have changed both config.php files to point to the localhost install of mySql & my Zencart DB.

When I try to access the site I get the following error:

0 DB_ERROR_NOT_CONNECTED

This is the only error info that is returned in the browser.

I've also tried to run the Fix_Cache_Key.php utility and I get the same error message. I tried to use this as I thought this key would have been the issue.

I've checked & double checked the user name, password, host name and db name and I'm confident that this is not the problem.

My environment is:
Win2003 Web Edition
PHP 4.3.11
mySql 4.1.18
Zencart 1.3.02

Any help with solving this problem would be greatly appreciated as this is the last thing I need to get off this server before I can re-purpose the server for other sites.

Thanks in advance for any help.

24 Jul 2006, 2:54 AM
#2
czone avatar

czone

New Zenner

Join Date:
Jul 2005
Posts:
16
Plugin Contributions:
0

Re: 0 Db_error_not_connected

By the way, I used the instructions for switching servers located here:

http://www.zen-cart.com/wiki/index.php/Server_Admin_-_Switch_Servers

and just followed the DB realted steps since I'm only moving the DB to the web server where Zencart is installed.

Sorry I forgot to mention this.

Thanks!

24 Jul 2006, 4:26 AM
#3
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: 0 Db_error_not_connected

czone,

on the new server run the installer, let it create a new database and set the config files for you,
then use your migrated database to over write the new database that was populated by the new install

26 Jul 2006, 4:27 PM
#4
photobabe avatar

photobabe

New Zenner

Join Date:
Nov 2005
Posts:
7
Plugin Contributions:
0

Re: 0 Db_error_not_connected

Hi,

I had this issue as well. Looking at the breadth of info forums here, I took the easy route and sent a ticket to my hosting company. :-)

They found the issue: in my case anyway. (from their e-mail response:) "There was no user fc1 created or assigned to the database. I created the user and gave it rights to the database." Now, I am so not a database person I have no idea what that means - I'm sure many of you all do! but in any event my shop was fixed with this solution.

Since my site had been up and running for many months I had to ask WHY/HOW this happened: their reply: "It's possible that it was a cpanel bug that caused the user to become corrupt or deleted. That is the most likely cause."

So there you go. If you've made no changes to your site/shop other than adding new products etc. this may be the issue. whith so many hosts using Cpanel this could quite possible be a common cause.

alex

26 Jul 2006, 5:11 PM
#5
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,763
Plugin Contributions:
9

Re: 0 Db_error_not_connected

czone,
If you have just recently put all the eggs in one basket, you probably need to add the bow on top.
I'm sure MerlinPA will come up with the answer immediately but, on windows, there's a file you need to run to tie all the php, mysql, etc. together. Otherwise they don't talk to each other.

26 Jul 2006, 8:19 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: 0 Db_error_not_connected

I believe dbltoe is referring to the PHP Connector for MySQL ... the client which allows PHP and MySQL to talk to each other.... downloadable from the mysql website.

26 Jul 2006, 9:45 PM
#7
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,763
Plugin Contributions:
9

Re: 0 Db_error_not_connected

That's why the Doctor gets the big bucks!:D

31 Jul 2006, 12:24 AM
#8
czone avatar

czone

New Zenner

Join Date:
Jul 2005
Posts:
16
Plugin Contributions:
0

Re: 0 Db_error_not_connected

Thanks for the trouble shooting but I tried installing PHP Connector for MySQL and this did not solve the issue. I still ge the Db_errror_not_connected message.

If you have any other ideas, it would be greatly appreciated.

Thanks,
czone

31 Jul 2006, 12:26 AM
#9
czone avatar

czone

New Zenner

Join Date:
Jul 2005
Posts:
16
Plugin Contributions:
0

Re: 0 Db_error_not_connected

Merlin,

I'm in the process if trying to install a seperate instance of ZenCart on the same server, using a different DB, but so far I haven't had a successful install yet. I think its a Windows issue that has nothing to do with ZenCart. I'll let you know once I get past this issue.

Thanks for the help.
czone

26 Aug 2006, 3:20 AM
#10
redradar avatar

redradar

New Zenner

Join Date:
Mar 2006
Location:
San Francisco, CA
Posts:
44
Plugin Contributions:
0

Re: 0 Db_error_not_connected

I'm experiencing the same problem with a Windows-based system when trying to upgrade to v1.3.0.2. I have two sites, my live site and my upgrade site, but cannot get the database to connect on the upgrade site. I dumped the original database and imported the dump file into the new database. The two configure.php files' paths have been edited to match my temporary /new_shop, and database, username and password have been changed to the new database I just made. The updated configure.php files have been FTPed to the server.

Why am I still getting 0 Db_error_not_connected?

26 Aug 2006, 4:00 AM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: 0 Db_error_not_connected

Redradar:

Why am I still getting 0 Db_error_not_connected?
You probably haven't granted rights to the username for your new database

26 Aug 2006, 4:08 AM
#12
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,763
Plugin Contributions:
9

Re: 0 Db_error_not_connected

You have not put some new or removed old database prefix listed in the configure.php have you?

Do your permissions for the database match the username and password in the configure.php?

29 Aug 2006, 4:33 PM
#13
redradar avatar

redradar

New Zenner

Join Date:
Mar 2006
Location:
San Francisco, CA
Posts:
44
Plugin Contributions:
0

Re: 0 Db_error_not_connected

That's it! I hadn't set the necessary permissions for the cache directory. Thank you so much for your help!