Connect with user and pwd from PHP to MySql !!!

From: Date: Thu, 11 Jan 2001 09:24:57 +0000
Subject: Connect with user and pwd from PHP to MySql !!!
Groups: php.general 
Request: Send a blank email to php-general+get-33942@lists.php.net to get a copy of this message
Hi, I've been looking on the cool web, but up till now I got only complex explanations about how to create users in mysql. I know it's more a MySQL question, but since lots of you are using this DB, maybe someone can just send me an example on how to create on a proper way (straight forward) users. The meaning is to consolidate the DB like: $connection = mysql_connect("localhost","nobody","dummy") or die("Couldn't connect to server."); $db = mysql_select_db("searchDB", $connection) or die("Couldn't select database. Mysql said: " .mysql_error()); I tried to add a user with password and host in the myql database and supposed to be able to use thatone for the searchDB database? Hope this doesn't sound to stupid at all! Thanks a lot for any trick or usefull example! Yoeri.

« previous php.general (#33942) next »