PDA

View Full Version : Create User/Pass


FuRiOuS1
07-04-2003, 04:41 PM
how do i create a username and password for a database? i tried using....

GRANT ALL ON database.* TO user_name IDENTIFIED BY 'password'

that gave me a "access denied" error. is that command just to set a users accesss level? is there i different command to make a username/password? help would be appreciated.

Morgoth
07-05-2003, 10:10 AM
Hum..
Try:
$sql = 'INSERT INTO DATABASE.user SET Host = \'LOCALHOST\', User = \'USERNAME\',
Password = PASSWORD(\'********\'), Select_priv = \'Y\', Insert_priv = \'Y\',
Update_priv = \'Y\', Delete_priv = \'Y\', Create_priv = \'Y\', Drop_priv = \'Y\',
Reload_priv = \'Y\', Shutdown_priv = \'Y\', Process_priv = \'Y\', File_priv = \'Y\',
Grant_priv = \'Y\', References_priv = \'Y\', Index_priv = \'Y\', Alter_priv = \'Y\'';
I put them on new lines so it doesn't mess witht he forum tables.
It's all originally suppose to be ONE line