LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-26-2014, 12:09 AM   #1
unclesamcrazy
Member
 
Registered: May 2013
Posts: 187

Rep: Reputation: 1
phpmyadmin - Separate account for each users


Hello sir,

Please help me to set up phpmyadmin.

I want each user should have his own individual accounts. One can create modify delete his created databases but created databases of one user should not be visible to other user. A user can see only his databases in the left pan. He must not access databases of other users by url or by any other method.

I have made changes in config.php what is mentioned in this url but it is not working.
I have created multiple users but anyone can see each other's database as well as they can retrive data and delete other user's databases too.
http://modelr.wordpress.com/2009/01/...e-users-setup/
http://alandoyle.com/blog/tutorials/...ultiple-users/

Please help me.

Thanks & Kind Regards
Sam

Last edited by unclesamcrazy; 01-26-2014 at 12:11 AM.
 
Old 01-26-2014, 05:03 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,516

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Hi,

You need to install a 2nd instance of phpmyadmin and in config.inc.php add:
Code:
$cfg['Servers'][$i]['only_db'] = array('user_db');
where the "user_db" is the database that you want your user to administer.
Then create a user that has only privileges on that database.

Regards
 
Old 01-26-2014, 05:24 AM   #3
unclesamcrazy
Member
 
Registered: May 2013
Posts: 187

Original Poster
Rep: Reputation: 1
Thanks bathory,
Thanks for your help,

But suppose every user has 5 databases, do I need to add an entry of each database in config file?
 
Old 01-26-2014, 09:04 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,516

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Quote:
Originally Posted by unclesamcrazy View Post
Thanks bathory,
Thanks for your help,

But suppose every user has 5 databases, do I need to add an entry of each database in config file?
In this case, you should use:
Code:
$cfg['Servers'][$i]['only_db'] = array('db1','db2','db3','db4','db5');
And you should create the user with full privileges for those 5 databases,

Last edited by bathory; 01-26-2014 at 09:15 AM. Reason: wrong answer
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
phpMyAdmin account sniper8752 Linux - Server 9 05-09-2013 08:04 AM
Separate Account for Squid Proxy? OtagoHarbour Linux - Security 7 08-03-2012 10:13 PM
Separate User Account for SSH ASJ925 Linux - Server 2 12-22-2011 07:50 PM
How to create separate list of samba users. gardenair Linux - Newbie 2 08-21-2011 03:45 AM
phpMyAdmin - Allow Users to create Databases blizunt7 Linux - Server 2 10-10-2007 07:00 AM


All times are GMT -5. The time now is 10:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration