Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Database Move


jack_frost

Recommended Posts

Ive moved Database, and now all my scripts are linkin to the wrong database, this is an easy fix i know.. IF you can find the links, and im getting Dizzy of all the rediricting that goes on in OSC. :/

 

The only one i was able to find was the one in Catalog/Admin/Includes/Config but thats not the only one.

 

when trying to acces the webshop by the normal 'www.myshop.dk' i get this warning string:

 

Warning: mysql_connect(): Access denied for user 'JackFro_oscomme'@'wsb4.surf-town.net' (using password: YES) in /hsphere/local/home/jackfros/noirshop.dk/shop/catalog/includes/functions/database.php on line 19 Unable to connect to database server!

 

this tells me it still links to the wrong database, but ive looked in the catalog/includes/functions/database.php on line 19 at it only seems to riderict to another .php, and i cant see what.

 

heres the line 19 string (i Think):

 

if (USE_PCONNECT == 'true') {
  $$link = mysql_pconnect($server, $username, $password);
} else {
  $$link = mysql_connect($server, $username, $password);
}

if ($$link) mysql_select_db($database);

return $$link;
 }

 

Anyone who knows wich .php that refferes to the database?

 

- JF

Link to comment
Share on other sites

there are 2 config files, one in catalog one in admin

 

make sure they are both connecting the right paths, and the right user, database name, and user password for each

 

that should do it, I have moved/changed datbases a million times for different shops and it should only take you about 5 minutes tops

 

HTH

"I must admit that I personally measure success in terms of the contributions an individual makes to her or his fellow human beings."

---Margaret Mead---

 

"The answer is never the answer. What's really interesting is the mystery. If you seek the mystery instead of the answer, you'll always be seeking. I've never seen anybody really find the answer -- they think they have, so they stop thinking. But the job is to seek mystery, evoke mystery, plant a garden in which strange plants grow and mysteries bloom. The need for mystery is greater than the need for an answer.

--Ken Kesey"

Link to comment
Share on other sites

there are 2 config files, one in catalog one in admin

 

make sure they are both connecting the right paths, and the right user, database name, and user password for each

 

that should do it, I have moved/changed datbases a million times for different shops and it should only take you about 5 minutes tops

 

HTH

 

I am trying to move my database, but I have problems to export the database... do you recomend to use PhpMyadmin for this, or OsCommerce?

Link to comment
Share on other sites

there are 2 config files, one in catalog one in admin

 

make sure they are both connecting the right paths, and the right user, database name, and user password for each

 

that should do it, I have moved/changed datbases a million times for different shops and it should only take you about 5 minutes tops

 

HTH

Quick question - I am trying to do this as well. You mentioned 2 files - one in catalog - I don't see a configuration.php file in the /catalog directory. Am I looking in the wrong directory?

 

I found a configuration.php file in /catalog/admin. Is the second config file you are referring to?

 

It would help me if you could provide the absolute paths to the files that have to be edited to point to a different database. Thanks.

JTM

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...