connecting to MySQL

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Mythic Fr0st
Forum Contributor
Posts: 137
Joined: Sat Dec 02, 2006 3:23 am
Contact:

connecting to MySQL

Post by Mythic Fr0st »

I used easyphp to get MySQL and Apache

when I try and connect it denies me, what stuff do I have to put in?

$con = mysql_connect("localhost","(NAME??)",(Password is here"");

can anyone tell me?
User avatar
evilchris2003
Forum Contributor
Posts: 106
Joined: Sun Nov 12, 2006 6:43 am
Location: Derby, UK

Post by evilchris2003 »

remove the brackets around name and password
Mythic Fr0st
Forum Contributor
Posts: 137
Joined: Sat Dec 02, 2006 3:23 am
Contact:

Post by Mythic Fr0st »

no, I meant them as questions

Name??? like what goes there, a name?


$con = mysql_connect("localhost","(WHATGOESHERE)",(DOESPASSWORD go here?");

oh and considering i havent setup MySQL and I dont think I can, because I downloaded it with Easyphp, so whats the default name & passwords that come?
Last edited by Mythic Fr0st on Sat Dec 02, 2006 8:51 pm, edited 1 time in total.
User avatar
evilchris2003
Forum Contributor
Posts: 106
Joined: Sun Nov 12, 2006 6:43 am
Location: Derby, UK

Post by evilchris2003 »

oh sorry

you need

a location (localhost)

and a username (name)

and password to login into the database

these are either given to you by your system administrator or defined by you when you install the database
Mythic Fr0st
Forum Contributor
Posts: 137
Joined: Sat Dec 02, 2006 3:23 am
Contact:

Post by Mythic Fr0st »

oh and considering i havent setup MySQL and I dont think I can, because I downloaded it with Easyphp, so whats the default name & passwords that come?

I am the admin O_O dont know my own pw...

so, can I use command prompt to get the password & username from admin?
User avatar
evilchris2003
Forum Contributor
Posts: 106
Joined: Sun Nov 12, 2006 6:43 am
Location: Derby, UK

Post by evilchris2003 »

i would be inclined to try

admin and password respectively

or admin for both but im sure that even an all in 1 setup (i assume thats what you have) will allow you to define these for yourself

do you have the mysql admin tool switched on because that will tell you your password

look like a traffic light in your Task bar
User avatar
William
Forum Contributor
Posts: 332
Joined: Sat Oct 25, 2003 4:03 am
Location: New York City

Post by William »

http://www.easyphp.org/faq.php3#6 - The default username is "root", password is "" and the host is obviously "localhost". :)
Last edited by William on Sat Dec 02, 2006 9:10 pm, edited 2 times in total.
Mythic Fr0st
Forum Contributor
Posts: 137
Joined: Sat Dec 02, 2006 3:23 am
Contact:

Post by Mythic Fr0st »

Nope, dont have a traffic light, or anything like it, the easyphp, has PhpMyAdmin, im not sure if

(Task bar, you mean where say, msn or yim or icq or internet etc.. is displayed?)

WOO nvm found it, thanks alot for your help!
User avatar
evilchris2003
Forum Contributor
Posts: 106
Joined: Sun Nov 12, 2006 6:43 am
Location: Derby, UK

Post by evilchris2003 »

Haha no problem whack [solved] on the front of your topic using the edit button
Post Reply