Databases :: MySql :: add users |
|||
| By: Squibi |
Date: 31/03/2003 00:00:00 |
Points: 20 | Status: Answered Quality : Excellent |
|
Hello mysql experts, I am running an mysql server on a windows mechine. I would like to add a new user which can only access one database, but every time I try to add the user the user has access/privaleges to all databases etc... say if i want to add a user, "user" to only have all privelages to database "userdb", what would be the exact lines to write in? thanks! |
|||
| By: VGR | Date: 31/03/2003 09:02:00 | Type : Answer |
|
| it's the basic behaviour of GRANT command in SQL. MySql doesn't give privileges to full databses. I guess you're using some "fancy but ridiculous" GUI tool :D Anyway, here it is from the mysql command line (mysql --user=root --password=yourpassword) : GRANT ALL PRIVILEGES ON databasename.tablename TO nameuser@hostuser IDENTIFIED BY 'thepassword'; in your particular example, this would read as : GRANT ALL PRIVILEGES ON userdb.* TO user@hostuser IDENTIFIED BY 'thepassword'; |
|||
| By: Squibi | Date: 01/04/2003 09:31:00 | Type : Comment |
|
| thanks VGR.. :) |
|||
|
Do register to be able to answer |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








