MySQL Forums
Forum List  »  Newbie

Re: Different Visible Databases for each User
Posted by: Barry Galbraith
Date: February 22, 2014 05:17AM

You need a user for each database.

SQLYog can make users for each database.
Open SQLYog as root.
Open the user manager.
Create dba_user@localhost and assign a password.
Select DatabaseA in the db pane.
Assign all relevant privs for this user.
Save changes.

Do the same again for dbb_user, and select DatabaseB and assign privs.
Save changes.

Now dba_user will only be able to see databaseA,
and dbb_user will only be able to see databaseB.

To do the same on the mysql commandline.
GRANT ALL on databaseA.* to 'dba_user'@'localhost' identified by 'user_a_pass';
GRANT ALL on databaseB.* to 'dbB_user'@'localhost' identified by 'user_B_pass';
FLUSH PRIVILEGES;

Good luck,
Barry.

Options: ReplyQuote


Subject
Written By
Posted
Re: Different Visible Databases for each User
February 22, 2014 05:17AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.