Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Where does the OSC SQL database ACTUALLY live?


Gnarlyman

Recommended Posts

Hi,

 

Had a real problem with my ISP during which they have physically moved all data and what-not. My website is back up and running along with my e-mail but unfortunately my OSC shop is not and as such is broken. My OSC installation cannot now 'see' the SQL database it was using.

 

My question is where is this actually stored? Is it somewhere in the 'catalog' folder or somewhere I can see when FTP into my domain? I can't see it anywhere. If I use MySQL or PHP MyAdmin it says there is not a database.

 

As my shop is inaccessible I cannot create a backup the usual way to work from and my last backup is weeks old. I really don't want to use it as I know the 'real' SQL database will be sat somewhere and either I am not looking in the right place or I don't have access to it. I have e-mailed my ISP to ask if they can find it and point me in the right direction or e-mail it to me so I can restore it, but if any clever bod in here knows where OSC actually stores the SQL database it is using on the server I would really appreciate them sharing that knowledge.

 

Cheers

 

Adrian

Link to comment
Share on other sites

Hi,

 

Had a real problem with my ISP during which they have physically moved all data and what-not. My website is back up and running along with my e-mail but unfortunately my OSC shop is not and as such is broken. My OSC installation cannot now 'see' the SQL database it was using.

 

My question is where is this actually stored? Is it somewhere in the 'catalog' folder or somewhere I can see when FTP into my domain? I can't see it anywhere. If I use MySQL or PHP MyAdmin it says there is not a database.

 

As my shop is inaccessible I cannot create a backup the usual way to work from and my last backup is weeks old. I really don't want to use it as I know the 'real' SQL database will be sat somewhere and either I am not looking in the right place or I don't have access to it. I have e-mailed my ISP to ask if they can find it and point me in the right direction or e-mail it to me so I can restore it, but if any clever bod in here knows where OSC actually stores the SQL database it is using on the server I would really appreciate them sharing that knowledge.

 

Cheers

 

Adrian

Where it is depends on how your webhost had it set up. They should be able to tell you where it is.

Link to comment
Share on other sites

Where it is depends on how your webhost had it set up. They should be able to tell you where it is.

 

So Basically (as I don't know much about this stuff), the working SQL database location is dictated by wherever my ISP stores SQL databases when I clicked 'Create Database' in MySQL (originally when I installed OSC months ago) rather than the location of the SQL database being an OSC controlled sort of thing?

Link to comment
Share on other sites

So Basically (as I don't know much about this stuff), the working SQL database location is dictated by wherever my ISP stores SQL databases when I clicked 'Create Database' in MySQL (originally when I installed OSC months ago) rather than the location of the SQL database being an OSC controlled sort of thing?

 

Your ISP and your webhost maybe the same, but usually not.

 

The two configure.php files have the database server and the database name. Usually the database server name is localhost. However, it can be like below (info changed because you don't tell anyone).

 

eg

// define our database connection

define('DB_SERVER', 'databaseservername.mywebhost.com');

define('DB_SERVER_USERNAME', 'myusernamethatIkeeptomyself');

define('DB_SERVER_PASSWORD', 'mypasswordthatIkeeptomyself');

define('DB_DATABASE', 'mydatabasenamethatIkeeptomyself');

Link to comment
Share on other sites

Your ISP and your webhost maybe the same, but usually not.

 

The two configure.php files have the database server and the database name. Usually the database server name is localhost. However, it can be like below (info changed because you don't tell anyone).

 

eg

// define our database connection

define('DB_SERVER', 'databaseservername.mywebhost.com');

define('DB_SERVER_USERNAME', 'myusernamethatIkeeptomyself');

define('DB_SERVER_PASSWORD', 'mypasswordthatIkeeptomyself');

define('DB_DATABASE', 'mydatabasenamethatIkeeptomyself');

 

OK...Cheers for the info. If my ISP is not helpful I will try and experiment with changing the DB_Server. Obviously if it is there somewher the User, pass and name will still be the same. What a complete pain all of this is.

Link to comment
Share on other sites

OK...Cheers for the info. If my ISP is not helpful I will try and experiment with changing the DB_Server. Obviously if it is there somewher the User, pass and name will still be the same. What a complete pain all of this is.

You will just have to find the new db server and change that, provided they did nothing more than what you think.

 

Remember that there are two configure.php files, one in admin and one in "catalog". The db stuff should be the same in both.

Link to comment
Share on other sites

OK...Cheers for the info. If my ISP is not helpful I will try and experiment with changing the DB_Server. Obviously if it is there somewher the User, pass and name will still be the same. What a complete pain all of this is.

 

your web host is bound to help you on this.

 

just call them and ask whats the hostname for your mysql database. also while at it, ask them whether there had been any changes to anything related to mysql recently.

 

and update your config entries as people said earlier. this should fix it.

Link to comment
Share on other sites

your web host is bound to help you on this.

 

just call them and ask whats the hostname for your mysql database. also while at it, ask them whether there had been any changes to anything related to mysql recently.

 

and update your config entries as people said earlier. this should fix it.

 

Hi,

 

Back Again :((

 

Done some changing and my ISP managed to get my data back :)

 

Have got the SQL database showing up in MySQL.... have recreated the username and password to the same as they were before.... now i get

 

1046 - No database selected

 

select configuration_key as cfgKey, configuration_value as cfgValue from configuration

 

[TEP STOP]

 

I am prettysure that I need to change configure.php from localhost to whatever it should be now. Thing is I don't actually get what 'localhost' is.... Is local host 'the name of the server' or does it just mean 'on this server'?

 

I get I need to change it from localhost, but I don't get what to change it to.

 

Any help appreciated.

Link to comment
Share on other sites

OK.... It appears I was barking up the wrong tree

 

If I go into PHPMyAdmin I can see it is 'localhost'

 

I have set both versions of configure.php back to 'localhost'

I am sure the username, password and database name are correct but it still get

 

1046 - No database selected

 

select configuration_key as cfgKey, configuration_value as cfgValue from configuration

 

[TEP STOP]

 

Can anybody help me?

Link to comment
Share on other sites

OK...so after much reading it appears 1064 errors can be due to incompatability with PHP and MySQL version.

 

I have read stuff about upgrading....but I am slightly confused..... How do I keep all my old data when I do a new install?

 

Should I rename my curent 'catalog' folder (eg 'catalogold') and effectively do a new install with a new database and then transfer the data from my old SQL database to a newly created one? If so is this done in PHPMyAdmin and how?

 

Cheers in advance for any help.

Link to comment
Share on other sites

OK.... It appears I was barking up the wrong tree

 

If I go into PHPMyAdmin I can see it is 'localhost'

 

I have set both versions of configure.php back to 'localhost'

I am sure the username, password and database name are correct but it still get

 

1046 - No database selected

 

select configuration_key as cfgKey, configuration_value as cfgValue from configuration

 

[TEP STOP]

 

Can anybody help me?

 

the 'not database selected' means that oscommerce was able to find the sql server and log in (using your username and password), but was unable to find the database that you've specified. in your configure.php file you have:

 

define('DB_DATABASE', 'mydatabasenamethatIkeeptomyself');

 

make sure the database name is correct. if your host moved the server, it's possible they had to rename the database as well.

 

you shouldn't have to reinstall. your host should have taken steps to move all of your data -- you just need to get to it rather than starting over. if you can access the database from phpmyadmin, then you should be able to find the name of the database and make sure your configure files are correct. and you wouldn't be able to transfer your old data anyway until you find it. :)

 

just talk to your hosting company and have them walk you through this until it works. they created the problem, the least they can do is help you through resolving it.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...