I am currently having a problem with allowing multiple users to login with phpmyadmin without seeing each other's databases. I am using this method: http://alandoyle.com/tutorials/configuring-phpmyadmin-for-multiple-users/
While the method works for th开发者_如何学Ce most part, although when creating a New User where I check off the "Grant all privileges on wildcard name (username_%)" selection does not allow me to login with that user unless I don't specify a password and enable "$cfg['Servers'][$i]['AllowNoPassword']".
What I've tried:
I've tried to create the same User where I don't check it off, but while I can login unfortunately I can see all the root databases. As opposed to when I choose no password and I can only see databases pertaining to that user.
EDIT: I found that setting the user to LOCALHOST only seems to have remedied this issue. Using ANYHOST does not work for local logins for some reason.
I'm having the same issue after I changed my root password on my testing server. I can no longer connect using any new users. I'm messing around but I think it might have something to do with adding blowfish security or something.
My PHP scripts cannot connect either. I also can't grant new users all privs. I'm not sure what I did to make this happen. I have legacy users that can achieve this.
You MUST have BOTH localhost and % for each user. Only then you can log-in locally AND from other hosts or client programs. This is why you find the root user having so many entries as well.
Steps to solve this:
- log in to phpmyadmin using root
- Select privileges
- Select the user you want to modify (i.e., to give log in privileges).
- If you already have given the host as any (%) now change it to localhost.
- Make sure you click on the option button "keep the old one" and update
Here's a screenshot showing the settings I'm referring to.
Now log out and log in as the new user.- You need to create mySql users
- You need to give mySql privileges to each user to only their databases
- Then I suggest you make simple form identification in phpMyAdmin
So all (grants) privileges, I think, must be managed from mySql, not any other way...
When u select the rights on the new user, check the GRANT flag if you like enable user.
If it also shows password-related error then try adding this line to your phpmyadmin's config.inc.php:
$cfg['Servers'][$i]['ssl'] = true;
I am using XAMPP and the answers above didn't work. Using 'localhost' as host name was not enough. I had to create 2 accounts, like itsols explained in his answer.
One of the users has host name 'localhost' and the other one has '::1' (which means localhost in IPv6). Only when I created both of them with the same username, I was able to login to phpmyadmin.
User accounts host names
精彩评论