Kevin Pei
Kevin Pei

Reputation: 5872

Phpmyadmin doesn't show "privileges" tab

I have WAMP installed on Windows, and I can't seem to get the "privileges" tab to show in PhpMyAdmin no matter what. Reading other forum discussions and articles, I have done the following:

Through those tests, I have gotten the following error: Can't find file: 'user' (errno: 2). A google search for a solution to that proved futile. Any help would be appreciated

Update: Screenshot enter image description here

Thanks

Upvotes: 21

Views: 109559

Answers (9)

For me I've added this to the "config.inc.php" and it works well:

$cfg['Servers'][$i]['DisableIS'] = true;

Upvotes: 0

Arvind GK
Arvind GK

Reputation: 27

Follow the root password change if you dont know the root password and then login in, it worked for me.

To change the mysql password for the root user, do the following:

  1. unload mysqld.nlm
  2. at the console, type: mysqld_safe --skip-grant-tables --autoclose
  3. at the server console type mysql

This will bring you to the mysql prompt. At this prompt type the following: (Where ******** is the new password, NOTE: the single quotes ARE REQUIRED)

mysql> UPDATE mysql.user SET Password=PASSWORD('********') WHERE User='root';
mysql> FLUSH PRIVILEGES;

Flush privileges will make the change take effect immediately.

You can, in MySQL Version 3.22 and above, use the SET PASSWORD statement: (Where ******** is the new password, NOTE: the single quotes ARE REQUIRED)

shell> mysql -u root mysql
mysql> SET PASSWORD FOR root=PASSWORD('********');

Another way to set the password is by using the mysqladmin command: (Where ******** is the new password)

shell> mysqladmin -u root password ********
shell> mysqladmin flush-privileges

Upvotes: 0

Rav
Rav

Reputation: 1470

Truly, only one thing has worked for me. root with blank password didn't work even with AllowNoPassword option. Notice that you could do grant create (instead of grant all) to grant only create table permissions. I want all permissions as it's for my local development.


My solution, it will give all you privileges there are for given user (make sure phpmyadmin is your username that you're able to log in with):

sudo mysql

mysql> grant all on *.* to phpmyadmin@localhost; mysql> flush privileges; mysql> exit


Then logout from PhpMyAdmin, log in again and you have all privileges.

Upvotes: 0

Troy
Troy

Reputation: 21

This one took me a long time to figure out as well as 'root' log in wasn't helping.

logged out and logged back in:

This time I put root as the username

And use the same password as my user account and I was given access.

This is what worked for me.

Upvotes: 2

Night Owl
Night Owl

Reputation: 4213

For people who run into this problem while using cPanel / WHM the post linked to below on the cPanel site states:

Per internal case number 37402, the functionality to add/delete/rename users and databases through phpMyAdmin has been removed because of the database mapping feature.

That means the Users / Privileges tab has been removed from cPanel's version of phpMyAdmin and it doesn't sound like it's coming back. The post is from December of 2013.

http://forums.cpanel.net/f354/phpmyadmin-users-tab-gone-367661.html

The cPanel staff member cPanelMichael who answered the post recommended two alternatives.

  1. Use "Home > SQL Services > Database Map Tool." This appears to be missing major functionality provided by phpMyAdmin.
  2. Install your own standalone version of phpMyAdmin and use that instead of the cPanel version.

You gotta love progress.

Upvotes: 6

Abhay Tomar
Abhay Tomar

Reputation: 175

You must be logging in as "localhost" @ phpmyadmin page

there are limited privileges given to the "localhost" user

where as if you login in as "root" without any password you'll have all the privilages and then you will see the user tab there on the phpmyadim homepage

Upvotes: 0

jave.web
jave.web

Reputation: 15072

I solved the problem like this:

1) I set a root password through SQL query like this:

  • On a main page you should see the current root user - usually root@localhost
  • So query for password change:
    SET PASSWORD FOR 'root'@'localhost' = PASSWORD('YOURPASSWORDHERE');

2) Search for config.inc.php in your wamp/xampp folder and change auth_type:

  • you may find more of those configs, however the one you need is the one that contains line:
    $cfg['Servers'][$i]['auth_type'] = 'SOMETHING'; - change 'SOMETHING' to 'cookie'
    So you get: $cfg['Servers'][$i]['auth_type'] = 'cookie'; (or http if you wish) -

3) clear/delete all browser cookies for your server (usually look for localhost or 127.0.0.1 cookies)

4) Go to phpyadmin's webpage again - now you will be prompted with login box (html or http - depends on whether you set the cookie or http)

5) LOGIN - AND YOU'RE DONE ! :) Suddenly 'Privileges'/'Users' tab is shown, the exit button appears suddenly too ! :) (next to the "little house"-left-top)



PS: config.inc.php contains more interesting settings :)

Upvotes: 2

skytreader
skytreader

Reputation: 11707

If you are sure that you are running as root, try clearing your cookies then refresh. This, AFAIK, is a bug affecting Google Chrome in particular but I can't say for certain for other browsers. Note that you can select what cookies to delete via the developers tab in Chrome. You need to delete only the localhost cookies.

Edit:

Oh no. So you've really deleted the 'user' table. My suggestion is that you either find CREATE scripts for the tables in database mysql or do a complete reinstall (as it appears, you don't have much DB's to lose anyway). Just for the record:

mysql> USE mysql;
Database changed
mysql> SHOW TABLES;
+---------------------------+
| Tables_in_mysql           |
+---------------------------+
| columns_priv              |
| db                        |
| event                     |
| func                      |
| general_log               |
| help_category             |
| help_keyword              |
| help_relation             |
| help_topic                |
| host                      |
| ndb_binlog_index          |
| plugin                    |
| proc                      |
| procs_priv                |
| proxies_priv              |
| servers                   |
| slow_log                  |
| tables_priv               |
| time_zone                 |
| time_zone_leap_second     |
| time_zone_name            |
| time_zone_transition      |
| time_zone_transition_type |
| user                      |
+---------------------------+
24 rows in set (0.00 sec)

Upvotes: 21

Eric Hotinger
Eric Hotinger

Reputation: 9316

Can you go into your Users tab at the top and edit your users (root, admin, any, whatever) by clicking on "Edit Privileges" and then under Administration, click grant?

Upvotes: 1

Related Questions