Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Cannot get installed right - cannot connect to database server

installation mysql

1 reply to this topic

#1 jrod

  • Community Member
  • 1 posts
  • Real Name:Jason Rodman

Posted 27 January 2012, 05:08

This is my first time setting up oscommerce, php and mysql, so I must be missing something. I have a dedicated server I installed all the prerequisites on (php, mysql). I followed the instructions to copy all the oscommerce files and launch the site in a browser. I went through all the steps in the setup wizard, but got an error when I tried to go to the admin panel or catalog. I get the dreaded "1046 - No database selected" error. Now when I went through the install wizard, i wasnt aware I needed to created the database first. I kind of figured that out from reading other forum posts. I thought the install did it automatically, or at least would check and give me some feedback.

So being new to MySQL, i downloaded the mysql workbench and created a blank model and saved it. I added a user account to that model and made sure it was exactly the same as in the configure.php file. I even made sure the name of the database matched the database file. I even tried using the "root" user account that i used when installing mysql and cannot connect. Is there some special format to the user name, or something i am missing in the configuration of the database? Does the database setting need to point to the location of the file, or just the name of the database? Does the username need the @localhost on the end of it? I have tried so many combinations I cant remember them all. Sometimes I will get a "Unable to connect to database server!" error instead of the other, but I cant tell if that is better or worse. Any ideas guys?

#2 DunWeb

  • Community Sponsor
  • 10,469 posts
  • Real Name:Chris Dunn
  • Gender:Male
  • Location:Tecumseh, Ontario, Canada N8N 1X8

Posted 27 January 2012, 05:11

@jrod,

The database name is key, MOST dedicated servers would use Localhost, as the database name but that might be different on yours. So it should appear like:

database name: localhost
username: the user permitted to access this database
Password: the password used to access the database





Chris
:|: Was this post helpful ? Click the LIKE THIS button :|:

:|: Click Here to learn how I can help you with custom coding, add ons, security and templates :|:

:|: Need an Area Calculator, Pre-Paid Account, Virtual Pin, Auction or Layaway Add on ? Click Here :|: