Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

No Database Selected


Guest

Recommended Posts

Posted

Scott,

 

I don't think you should have DB_SERVER as localhost if your store is live.

 

All my configure.php files have something similar to this in that section.

 

p50mysqlxxx.secureserver.net

 

 

 

Perhaps you should check the Data Base Server name to see what should be in that spot.

 

 

Chris

Posted
Scott,

 

I don't think you should have DB_SERVER as localhost if your store is live.

 

All my configure.php files have something similar to this in that section.

 

p50mysqlxxx.secureserver.net

 

 

 

Perhaps you should check the Data Base Server name to see what should be in that spot.

 

 

Chris

 

 

I am trying to figure this out. Our site worked fine for 3 months prior to today. I have no idea how long it's been down. I cannot locate where the database server name would be. Is that my host? https://secure43.inmotionhosting.com?

Posted

are you sure you are talking about version 3.x of osc?? which I doubt very much. if you post it on the right forum I would give you a full reply RE db server and possible causes.

Ken

Posted

I received the error, "1046 - No database selected

 

select configuration_key as cfgKey, configuration_value as cfgValue from configuration

 

[TEP STOP]"

 

This affects my shopping cart and my Admin.

 

When i checked cpanel for databases, there was no database listed.

I checked both config.php and both of them match.

 

define('DB_SERVER', 'localhost');

define('DB_SERVER_USERNAME', '******');

define('DB_SERVER_PASSWORD', '******');

define('DB_DATABASE', 'holdre5_osc1');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', 'mysql');

 

Any suggestions? I am still waiting to hear from OsCommerce support. Until then my site is down.

Posted
are you sure you are talking about version 3.x of osc?? which I doubt very much. if you post it on the right forum I would give you a full reply RE db server and possible causes.

Ken

 

 

Ok, you're right i am V.2.2rc2

 

should i upgrade once this is resolved?

Posted

so i was right you were not talking about osc v3.x. anway, if your store hds been running OK but all a sudden you get this error, then it is very likely your host may have changed something which affect databases so your first call i guess would be to your host. if they change thing that way then i can say they are not doing a proper job and more trouble may be ahead in future.

 

RE db names:either localhost, 127.0.0.1 or a physical db server (name) would be acceptable depending on the host. You can see the db server name when you log in phpMyAdmin - you wont miss it. the general rule is, if the db server is on the same server as the web server then you use former two formats of db server names, with 127.0.0.1 is more reliable on many hosts. if the db server is on another machine, ie, not on the same server as the web server, then you use what the host gives you that server name as the db server name.

 

Good Luck!

Ken

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Posted
so i was right you were not talking about osc v3.x. anway, if your store hds been running OK but all a sudden you get this error, then it is very likely your host may have changed something which affect databases so your first call i guess would be to your host. if they change thing that way then i can say they are not doing a proper job and more trouble may be ahead in future.

 

RE db names:either localhost, 127.0.0.1 or a physical db server (name) would be acceptable depending on the host. You can see the db server name when you log in phpMyAdmin - you wont miss it. the general rule is, if the db server is on the same server as the web server then you use former two formats of db server names, with 127.0.0.1 is more reliable on many hosts. if the db server is on another machine, ie, not on the same server as the web server, then you use what the host gives you that server name as the db server name.

 

Good Luck!

Ken

 

 

yes, my sql says "Server: Localhost via UNIX socket"

Posted

If there is no database in your cPanel then I would be contacting your hosting company to see where it is and what happened!

Archived

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

×
×
  • Create New...