Database User

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Database User

Postby BobbyS » 23. January 2008 00:20

I cannot seem to figure out how to set an existing user to a new database. I wouldn't think I would have to create a new user to put with a new database would I?

Thanks
BobbyS
 
Posts: 24
Joined: 04. July 2007 23:02
Location: Alb, New Mexico

Postby sari42 » 23. January 2008 00:40

GRANT ALL PRIVILEGES ON `somedb`.* TO 'someuser'@'somehost' WITH GRANT OPTION ;

(see http://dev.mysql.com/doc/refman/5.0/en/grant.html )

cheers
sari42
 
Posts: 800
Joined: 27. November 2005 18:28

Postby BobbyS » 23. January 2008 00:54

ok I went in to user overview and selected the grant box and it added that user to global and to my new database. Thanks a bunch!! :D
BobbyS
 
Posts: 24
Joined: 04. July 2007 23:02
Location: Alb, New Mexico

Postby Izzy » 23. January 2008 01:03

BobbyS wrote:ok I went in to user overview and selected the grant box and it added that user to global and to my new database. Thanks a bunch!! :D
Not a good idea to give any single user, other than the super user root, global privileges.

This database user should have privileges for the database you set only - best practices learned now will be of benefit regarding security in the future.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby BobbyS » 23. January 2008 05:10

Thanks Izzy. I got to thinking and came up with the same conclusion.
BobbyS
 
Posts: 24
Joined: 04. July 2007 23:02
Location: Alb, New Mexico


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 46 guests