[nycphp-talk] Connecting to MySQL on host questions
Bill Wolf
wiw at nyc.rr.com
Tue Jan 13 23:56:38 EST 2004
Brand new to PHP. Got a couple of questions.
The following code runs on my local machine but not on my host. On the host
I'm not sure what value to use for the $site variable. Using the website or
IP address isn't working.
>>
// connect to the RDBMS
$db = mysql_connect("$site","$user","$pass")
or die_now("<h2>Could not connect to database server</h2><p>Check
passwords and sockets</p>$site,$user,$pass");
// select the database
mysql_select_db("$database",$db)
or die_now("<h2>Could not select database $database</h2><p>Check
database name</p>");
<<
Also, why does one select the database after logging in with the user/pw?
Does a username span all of my databases or are users under a given
database? And also, on a typical web host that serves many accounts, am I
sharing a database with other host accounts or do I have my very own MySQL
instance?
And lastly, is there a way to connect to MySQL on my host using a client
side tool like MySQL Turbo Manager? Is the account I'd use the same
account/pw I'd use to FTP files or is it one of the MYSQL usernames?
Much thanks
-Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20040113/2573a2a8/attachment.html>
More information about the talk
mailing list