Re: connecting to msql... easy question!
| From: | p.whiter | Date: | Sat, 20 Oct 2001 13:55:34 +0000 |
| Subject: | Re: connecting to msql... easy question! | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-13563@lists.php.net to get a copy of this message | ||
Hi
Well you should have the server name from your host, *usually* 'localhost',
a typical connection for me is below:
$connection = mysql_connect("localhost","username","password") or
die("Couldn't Connect");
HTH
Paul
----- Original Message -----
From: "David Bedingfield" <dave@bedingfield.net>
To: <php-db@lists.php.net>
Sent: Saturday, October 20, 2001 2:16 PM
Subject: [PHP-DB] connecting to msql... easy question!
: ...still no luck with this... any help?
:
: David Bedingfield wrote:
:
: > With a basic php document, I am trying to create a table. I have a good
: > code for the table (I think) but I cannot connect to the SQL server. I
: > have the SQL server name, SQL username, SQL password, and SQL database
: > name. I have tried too many options to list here. It is not a localhost.
: >
: > I'm using the function msql_connect();
: >
: > I can't figure out how to properly write the server name in between to
: > parentheses. I keep get fatal errors, and parsing errors, and all kinds
: > of crazy errors.
: >
: > Spent most my night researching this, to no avail. Any response will be
: > greatly appreciated.
:
:
: --
: PHP Database Mailing List (http://www.php.net/)
: To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
: For additional commands, e-mail: php-db-help@lists.php.net
: To contact the list administrators, e-mail: php-list-admin@lists.php.net
: