MYSQL DATABASE wont connect using php?

Max

New member
HI i have my own website and i use expression web as my editor, ive downlaoded mysql and got a database. I'm trying to create a login page.

My php script is sound, but it wont connect to my database.

i'm using "localhost" "root" "mypassword" (not my actually password) to connect to my databse and it keeps saying cant connect when i put it on my website. Can anyone help me fic this please?

in a step by step way, im new to mysql

thanks
 
First off, where is you database located? If it's not on the same computer your site is on, you can't use "localhost"... you'd have to use the domain or the ip address of the mySQL server.

Other than that, it would help if you posted the actual text of the error. From your description, it's impossible to tell whether it's rejecting you based on you host, your login credentials, your database name, or some other reason all together.

Also, did you double check to make sure you'd spelled your host, login, password, and database name correctly? All four have to be correct, and it's case-sensitive.
 
Back
Top