Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding users 1

Status
Not open for further replies.

skiflyer

Programmer
Sep 24, 2002
2,213
US
Ok, so I setup my little test database and PHP script to go with it...

I've enabled passwords on my database just for fun.

Now when I use
$username="root";
$password="rootpwd";
$host="localhost";

then

mysql_connect($host, $username, $password);

Everything is fine, but if I change
$username="testacct";

and put the appropriate password in, I can't connect. All I've done is added the user "testacct" to the user table under mysql, along with the password, applying the PASSWORD function (I'm using phpmyadmin).

Is there more I need to do, something I haven't done right? A thread I couldn't find that I need to read?

Thanks all,
Rob
 
if you inserted the user directly into the tables you have to run FLUSH PRIVILEGES to make the changes valid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top