Jump to content


Photo

assigning a user to a specific database


  • Please log in to reply
2 replies to this topic

#1 EverToDesign

EverToDesign
  • Members
  • Pip
  • Newbie
  • 1 posts

Posted 30 December 2003 - 12:55 AM

Hey pretty newb question I guess but how can I assign a username/password login to mysql thats valid only for ONE Database?

#2 shivabharat

shivabharat
  • Members
  • PipPipPip
  • Advanced Member
  • 371 posts
  • LocationChennai, India

Posted 30 December 2003 - 03:38 PM

You can set the privelage that the user will have on the database.
Refer manual to set the privelage.

You can also store the database that the user will be accesing along with the user name and password. You can retrive this information and make him access the database thats is specified.
Knowledge --- Reading Enriches Mind But Sharing Enhances It.[br][br]Note: Before you request help enusre that you have had a look at the tutorials @phpfreaks

#3 gizmola

gizmola
  • Administrators
  • Advanced Member
  • 4,664 posts
  • LocationLos Angeles, CA USA

Posted 30 December 2003 - 11:16 PM

Hey pretty newb question I guess but how can I assign a username/password login to mysql thats valid only for ONE Database?


Using the GRANT SQL statement you can create new users and GRANT them access to resources.

Mysql has a data dictionary in the mysql database. The admin account can see this database but other users usually can\'t. There are a couple of tables that get updated when you use the GRANT command: user and db. Between these two tables mysql handles security.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users