Forum Moderators: open

Message Too Old, No Replies

Help with Database

geoclassfied

         

halcyonlost

1:46 am on Oct 24, 2006 (gmt 0)

10+ Year Member



Hey Guys,

Im not even going to pretend to know about this stuff so bare with me.

I am trying to set up a classified program using geoclassfied lite. I setup MySQL with user name and password and gave it full access to the database.

The guide then tells me to change data in my config.php. I change it and save it to the site and when the program trys to connect to database, it gives me an error(unable to connect to the database).

Here is what it said in the config.php:

$db_host = "localhost";//location of sql host - usually localhost
$db_username = "mikecook";//username used to connect to database
$db_password = "#*$!#*$!X";//password used to connect to database
$database = "geoclassifieds";//name of database

The sad thing is, its telling me what to do but Im still not getting it. Any help would greatly be appreciated.

physics

6:07 am on Oct 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




I setup MySQL with user name and password and gave it full access to the database.

Do you mean you created a database in MySQL and then created a user with full access to it? Not trying to nitpick but I was confused by what you wrote. Are you using phpMyAdmin or did you set up the db on the mysql command line or ...?

halcyonlost

8:34 am on Oct 24, 2006 (gmt 0)

10+ Year Member



Yes, I created a database, setup a username/pw and gave it all privalidges(I'm bad at explaining things). I'm using phpMyAdmin 2.6.3.

wheelie34

5:48 pm on Oct 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



When you login to PHP MyAdmin do you see the database? if you do, across the top of the page it will say.

Database NAME running on localhost

(NOTE it says where its running as well)

NAME is the full name for your db, I work on ensim and it sets db's up like this domain_com_-_NAME and that is what I use to connect it wont allow a connection just to NAME, its something to check.

When you login to PHP MyAdmin are you using root privelages or as the NAME database user? if using root, logout and try to login with what you think is the user/pa$$ that you setup, if you can login with it AND the db NAME is correct in your config file, then I have no answer, sorry.

EDIT

Just thought, where is your config details, are you calling it from a seperate file or is it on an individual page? maybe the script cant find the db details.

physics

8:16 pm on Oct 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you know the root mysql pass you can test whether it's a permissions problem by using the root login / pass in your config.php file ... just make sure to change it back right after.