----- Original Message -----
From: "Todd Cary" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, May 11, 2002 7:27 PM
Subject: [Newbie] Connecting for the first time


> What is my first step to getting connected?  This does not work:
>
> <?
>   $link = mysql_connect("http://209.204.172.137";, "root", "");


Hi Todd,

Well, I dunno what is the best way to get connected on your Linux box, but I
fear that connecting as root without having the root password set, is
probably NOT the best way.

You may wanna drop out of PHP for a minute, and do the following in your
mysql client:

mysql> UPDATE user
        -> SET password=PASSWORD('new-root-password')
        -> WHERE user='root';

And then,

mysql> FLUSH PRIVILEGES;

To make it all stick.

Also, I would advise, although I am pretty new at this myself, that you not
run the MySQL daemon as root, nor do everything within MySQL as root (same
principle which applies to UNIX in general, actually). Have the MySQL daemon
run as the "mysql" user or something; and create special MySQL users, each
with their own, custom privileges, limited to the database(s) they need.

Regards,

- Mark


---------------------------------------------------------------------
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

Reply via email to