Let me explain a little further.
----- Original Message -----
From: "josh kneedler" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 13, 2001 7:03
Subject: connecting to mysql using php
> i'm trying to connect to mysql using php so that i can do web based
> queries of my tables. i'm new at this so here are some questions:
> 1. is localhost just the ip of my server or is it also the path to
> where mysql is on my server?
Using the word localhost is only used when mysql server is on the same
machine as your web server otherwise you need ip address or full host name.
> 2. if root is the login name should it be my login or just stay as root?
Not a good idea to use root, create another user with restricted access.
> 3. is mypasswd the same password i enter when i'm in the mysql
> evironment in reference to (mysql -u root -p)?
>
> once i can declare the dbcnx variable i'll be able to do queries with php.
> josh
>
> // Connect to the database server
> $dbcnx = @mysql_connect("localhost",
> "root", "mypasswd");
> if (!$dbcnx) {
> echo( "<P>Unable to connect to the " .
> "database server at this time.</P>" );
> exit();
> }
>
> --
> dreaming america : visual media studio
> 503.222.2242 : http://dreamingamerica.com
> ::::...:::. http://rangermag.com :....::...:::::::.....:.v.1.i.2...::::::
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php