PDA

View Full Version : define our database connection??? Newbie, assistance please



louish
01-19-2003, 04:13 PM
I am very new to PHP and MYSQL, and dont even know what im doing, at all. If someone could please explain to me what exactly I need to modify when it says:
// define our database connection
define('DB_SERVER', 'exchange');
define('DB_SERVER_USERNAME', 'mysql');
define('DB_SERVER_PASSWORD', '*****');
define('DB_DATABASE', 'catalog');
define('USE_PCONNECT', 1);

The ONLY thing I know to change is the password (which I *'d out.).

So pretty much, the ONLY thing I modified so far in the application_top.php file was the DB_SERVER_PASSWORD... thats it. I dont know what else to modify.

And when I go to my site, it says it cant connect to the database :( . (not surprized! :!: )

I am running on a Cobalt RAQ3 with PHP3 and MySQL (Cobalt MySQL Release 3.23.37-1)

the url to my store is http://www.teamlouish.com/os/catalog/

I am an extreme newbie to MySQL, so I need to be spoken too like an idiot. Thanks :)

doug
01-20-2003, 01:47 AM
Did you follow the standard osCommerce install?

I know it can be a little hard to find but from memory it is in a directory called install in the catalog directory.

Failing that download and follow the superb installation document available from this site under downloads :wink:

louish
01-20-2003, 02:21 AM
I dont have an install folder. Just an install file that has a short description of extracting the contents of the tar file and extracting the sql tables.

i kept reading on other posts from other peple about an install folder... I dont have that anywhere. i downloaded the latest copy from http://www.oscommerce.com/downloads

I downloaded both the individule files and the package download. Neither have install folders nor any install.php file anywhere. They just have a simple 4k install file in the root dir (before catalog or admin) which includes quick installation steps for un tarring the files.

modom
01-20-2003, 07:47 AM
Hi,

This is the link for the 2.2 version:
http://www.oscommerce.com/downloads/snapshot

It looks like from your url that you downloaded 2.1

louish
01-23-2003, 09:50 AM
Ok.. now I downloaded the latest version and I found the install folder.. and I cant get it to connect to the database. This is on its own server, so I have full access to any mysql stuff, I just dont know how. The error in getting in the install is:

Access denied for user: 'mysql@localhost' (Using password: YES)

When I click BACK to fix it, these are the settings I have set:

Database Server: (i put localhost, and I also tried the IP address of the server too, still no luck)

Username: (I put mysql)
Password: I put the correct password.
Database: catalog (I created the catalog database manually with the instructions in the install text file.

And I have the Enable Persistent Connections checked.
And I have the radio button selected on Store Sessions in Database.


Do I need to create a new user or something in mysql ? If so.. how do I do that?
Thanks

modom
01-23-2003, 10:13 AM
Hi,

After you setup your db in phpmyadmin you have to setup a user and add the user to the db you just created. Did you do this?

louish
01-23-2003, 01:05 PM
Well I got it working. I dont use PHPMyAdmin, I did it all through the command prompt. I had a friend send me the information on how to grant a new user to the mysql db.

Got it all working, looks great. Thanks everyone.

DenverDave
01-23-2003, 04:17 PM
If you are a Guru - use the command line, for us other mortals, we use phpMyAdmin .

dc25
12-07-2003, 11:44 PM
I got the "Access denied for user: 'mysql@localhost' (Using password: YES)" error again when I use phpMyAdmin. Where can I check if I have the correct MySQL username and password?

Thank you,
Dennis

dc25
12-07-2003, 11:46 PM
I got it. It's still the default root with no password. Where can I change it?