1
votes

I tried to set the root password with phpMyAdmin and I now now phpMyAdmin->Users shows the error "No Privileges"

Background

Just installed MYSQL (with XAMPP) - and tried to change the "root" password via phpMyAdmin->Users->root->password.

now phpMyAdmin->Users shows the error "No Privileges"

How to get things back, and remove the error.

Also - maybe this is nothing, but when I first tried to change the password, I pressed the "Wong" go button, the one at the end, and it created an extra "root" user. So I deleted the user.

My config.inc.php File has:

$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
1

1 Answers

1
votes

If you are logged in as the root user and changed the root user password, you need to tell phpMyAdmin the new password, otherwise you won't be logged in properly and will get "No Privileges" errors :-)

With phpMyAdmin, there are several authentication methods ("auth_types") that can be used. They're configured in the configuration file, config.inc.php, usually with a line like $cfg['Servers'][$i]['auth_type'] = 'cookie';. Possible choices are "config" where the username and password are hard coded in to the configuration file, and "cookie" or "http" where the user is prompted for the username and password on login. I don't know how XAMPP does it, but since you have the $cfg['Servers'][$i]['user'] = 'root'; and $cfg['Servers'][$i]['password'] = ''; lines it is likely that your auth_type is config (those lines are meaningless with the other types).

So in that case, simply plug your new password in to the password field instead of having it blank as posted above.

It's possible that you deleted the wrong root user. There are generally at least two on a MySQL installation with different host fields; they're used in different connection scenarios (whether you're connecting via socket or tcp connection, for instance, or from another machine on the network). If you happen to have deleted the wrong one, you may have to refer to the MySQL manual for instructions to reset a lost password and recreate the user you're missing.