Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Migration Problem


Guest

Recommended Posts

Posted

I am migrating Oscommerce to a new server and I copied all the files and database to the new server. I changed the config files to point to the new server and now I am getting this error"

Warning: mysql_query(): No database selected in /home/osc/catalog/includes/functions/database.php on line 45
1046 - No database selected

select configuration_key as cfgKey, configuration_value as cfgValue from configuration

[TEP STOP]

 

I tried to set the $database variable to the osc database but nothing happened, still the same error!

 

Any ideas would be highly appreciated!

Thanks

Posted
I am migrating Oscommerce to a new server and I copied all the files and database to the new server. I changed the config files to point to the new server and now I am getting this error"

Warning: mysql_query(): No database selected in /home/osc/catalog/includes/functions/database.php on line 45
1046 - No database selected

select configuration_key as cfgKey, configuration_value as cfgValue from configuration

[TEP STOP]

 

I tried to set the $database variable to the osc database but nothing happened, still the same error!

 

Any ideas would be highly appreciated!

Thanks

 

 

If you have changed the database info in your configure.php files to match your new database info check a couple of things.

 

1. A lot of servers use a username_databasename setup. Look at your database from your hosting control panel and see how the database and user are listed. If they are listed this way then you have to enter them in that way in your configure.php files

 

2. Make sure you have assigned your user to your database. It is a three step process, create database, create user, assign user to database. if you leave out step three you will get that error also.

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Posted

I can connect to the Db server ok. Would it be caused by a missing file??? I am uploading my files again just to make sure its not a missing file. Any other ideas on what I can check to make this work?

Posted
I can connect to the Db server ok. Would it be caused by a missing file??? I am uploading my files again just to make sure its not a missing file. Any other ideas on what I can check to make this work?

 

If you are getting the 1046 error then osC is not connecting to the database. This is caused by the database info in your configure.php not being correct or as I mentioned in my above post because the user has not been assigned to the database.

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Posted

I had misspelled the database name in the configure.php. It working now

 

If you are getting the 1046 error then osC is not connecting to the database.  This is caused by the database info in your configure.php not being correct or as I mentioned in my above post because the user has not been assigned to the database.

Archived

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

×
×
  • Create New...