Phpmyadmin不显示“特权”选项卡

时间:2022-08-18 20:16:40

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:

我在Windows上安装了WAMP,无论如何,我似乎无法在PhpMyAdmin中显示“权限”选项卡。阅读其他论坛讨论和文章,我做了以下事情:

  • Checked to make sure that I'm logged in as root
  • 检查以确保我以root用户身份登录
  • Reinstalled wamp
  • 重新安装wamp
  • Reset my mysql users
  • 重置我的mysql用户
  • Run mysql check on users
  • 对用户运行mysql检查
  • Cleared my cache
  • 清除我的缓存

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

通过这些测试,我得到以下错误:找不到文件:'user'(错误号:2)。谷歌搜索解决方案被证明是徒劳的。任何帮助,将不胜感激

Update: Screenshot Phpmyadmin不显示“特权”选项卡

更新:截图

Thanks

谢谢

7 个解决方案

#1


18  

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.

如果您确定以root用户身份运行,请尝试清除Cookie然后刷新。这个AFAIK特别是影响谷歌Chrome的错误,但我不能肯定地说其他浏览器。请注意,您可以通过Chrome中的开发人员标签选择要删除的Cookie。您只需要删除localhost cookie。

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中的表找到CREATE脚本,要么完全重新安装(因为看起来,你没有太多的DB会丢失)。仅供记录:

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)

#2


5  

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

对于在使用cPanel / WHM时遇到此问题的人,在cPanel站点上链接到下面的帖子指出:

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.

根据内部案例编号37402,由于数据库映射功能,已删除通过phpMyAdmin添加/删除/重命名用户和数据库的功能。

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.

这意味着用户/权限选项卡已从cPanel的phpMyAdmin版本中删除,并且听起来不像是它回来了。该帖子是2013年12月。

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

http://forums.cpanel.net/f354/phpmyadmin-users-tab-gone-367​​661.html

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

回答帖子的cPanel工作人员cPanelMichael推荐了两种选择。

  1. Use "Home > SQL Services > Database Map Tool." This appears to be missing major functionality provided by phpMyAdmin.
  2. 使用“主页> SQL服务>数据库映射工具”。这似乎缺少phpMyAdmin提供的主要功能。
  3. Install your own standalone version of phpMyAdmin and use that instead of the cPanel version.
  4. 安装自己的独立版本的phpMyAdmin并使用它而不是cPanel版本。

You gotta love progress.

你必须喜欢进步。

#3


2  

I solved the problem like this:

我解决了这个问题:

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

1)我通过SQL查询设置root密码,如下所示:

  • On a main page you should see the current root user - usually root@localhost
  • 在主页面上,您应该看到当前的root用户 - 通常是root @ localhost
  • So query for password change:
    SET PASSWORD FOR 'root'@'localhost' = PASSWORD('YOURPASSWORDHERE');
  • 因此查询密码更改:SET PASSWORD FOR'root'@'localhost'= PASSWORD('YOURPASSWORDHERE');

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

2)在wamp / xampp文件夹中搜索config.inc.php并更改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) -
  • 您可能会找到更多这些配置,但您需要的是包含线路的配置:$ cfg ['Servers'] [$ i] ['auth_type'] ='SOMETHING'; - 将'SOMETHING'更改为'cookie'所以你得到:$ cfg ['Servers'] [$ i] ['auth_type'] ='cookie'; (如果你愿意,可以是http) -

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

3)清除/删除服务器的所有浏览器cookie(通常查找localhost或127.0.0.1 cookie)

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)

4)再次访问phpyadmin的网页 - 现在您将收到登录框提示(html或http - 取决于您是否设置了cookie或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)

5)登录 - 你完成了! :)突然显示'Privileges'/'Users'选项卡,出现按钮突然出现! :)(旁边的“小房子”-left-top)



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

PS:config.inc.php包含更多有趣的设置:)

#4


2  

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

这个花了很长时间才弄明白,“root”登录并没有帮助。

logged out and logged back in:

退出并重新登录:

This time I put root as the username

这次我把root作为用户名

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

并使用与我的用户帐户相同的密码,我获得了访问权限。

This is what worked for me.

这对我有用。

#5


1  

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?

您可以进入顶部的“用户”选项卡,然后通过单击“编辑权限”编辑您的用户(root,admin,any等),然后在“管理”下单击“授予”。

#6


0  

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

您必须以“localhost”@ phpmyadmin页面登录

there are limited privileges given to the "localhost" user

给予“localhost”用户有限的权限

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

如果您以“root”身份登录而没有任何密码,您将获得所有权限,然后您将在phpmyadim主页上看到用户选项卡

#7


0  

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

如果您不知道root密码然后登录,请按照root密码更改,它对我有用。

To change the mysql password for the root user, do the following:
  1. unload mysqld.nlm
  2. 卸载mysqld.nlm
  3. at the console, type: mysqld_safe --skip-grant-tables --autoclose
  4. 在控制台,键入:mysqld_safe --skip-grant-tables --autoclose
  5. at the server console type mysql
  6. 在服务器控制台类型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提示符。在此提示符下键入以下内容:(其中********是新密码,注意:单引号是必需的)

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

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)

在MySQL 3.22及更高版本中,您可以使用SET PASSWORD语句:(其中********是新密码,注意:单引号是必需的)

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

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)

设置密码的另一种方法是使用mysqladmin命令:(其中********是新密码)

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

shell> mysqladmin -u root密码******** shell> mysqladmin flush-privileges

#1


18  

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.

如果您确定以root用户身份运行,请尝试清除Cookie然后刷新。这个AFAIK特别是影响谷歌Chrome的错误,但我不能肯定地说其他浏览器。请注意,您可以通过Chrome中的开发人员标签选择要删除的Cookie。您只需要删除localhost cookie。

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中的表找到CREATE脚本,要么完全重新安装(因为看起来,你没有太多的DB会丢失)。仅供记录:

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)

#2


5  

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

对于在使用cPanel / WHM时遇到此问题的人,在cPanel站点上链接到下面的帖子指出:

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.

根据内部案例编号37402,由于数据库映射功能,已删除通过phpMyAdmin添加/删除/重命名用户和数据库的功能。

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.

这意味着用户/权限选项卡已从cPanel的phpMyAdmin版本中删除,并且听起来不像是它回来了。该帖子是2013年12月。

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

http://forums.cpanel.net/f354/phpmyadmin-users-tab-gone-367​​661.html

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

回答帖子的cPanel工作人员cPanelMichael推荐了两种选择。

  1. Use "Home > SQL Services > Database Map Tool." This appears to be missing major functionality provided by phpMyAdmin.
  2. 使用“主页> SQL服务>数据库映射工具”。这似乎缺少phpMyAdmin提供的主要功能。
  3. Install your own standalone version of phpMyAdmin and use that instead of the cPanel version.
  4. 安装自己的独立版本的phpMyAdmin并使用它而不是cPanel版本。

You gotta love progress.

你必须喜欢进步。

#3


2  

I solved the problem like this:

我解决了这个问题:

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

1)我通过SQL查询设置root密码,如下所示:

  • On a main page you should see the current root user - usually root@localhost
  • 在主页面上,您应该看到当前的root用户 - 通常是root @ localhost
  • So query for password change:
    SET PASSWORD FOR 'root'@'localhost' = PASSWORD('YOURPASSWORDHERE');
  • 因此查询密码更改:SET PASSWORD FOR'root'@'localhost'= PASSWORD('YOURPASSWORDHERE');

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

2)在wamp / xampp文件夹中搜索config.inc.php并更改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) -
  • 您可能会找到更多这些配置,但您需要的是包含线路的配置:$ cfg ['Servers'] [$ i] ['auth_type'] ='SOMETHING'; - 将'SOMETHING'更改为'cookie'所以你得到:$ cfg ['Servers'] [$ i] ['auth_type'] ='cookie'; (如果你愿意,可以是http) -

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

3)清除/删除服务器的所有浏览器cookie(通常查找localhost或127.0.0.1 cookie)

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)

4)再次访问phpyadmin的网页 - 现在您将收到登录框提示(html或http - 取决于您是否设置了cookie或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)

5)登录 - 你完成了! :)突然显示'Privileges'/'Users'选项卡,出现按钮突然出现! :)(旁边的“小房子”-left-top)



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

PS:config.inc.php包含更多有趣的设置:)

#4


2  

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

这个花了很长时间才弄明白,“root”登录并没有帮助。

logged out and logged back in:

退出并重新登录:

This time I put root as the username

这次我把root作为用户名

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

并使用与我的用户帐户相同的密码,我获得了访问权限。

This is what worked for me.

这对我有用。

#5


1  

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?

您可以进入顶部的“用户”选项卡,然后通过单击“编辑权限”编辑您的用户(root,admin,any等),然后在“管理”下单击“授予”。

#6


0  

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

您必须以“localhost”@ phpmyadmin页面登录

there are limited privileges given to the "localhost" user

给予“localhost”用户有限的权限

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

如果您以“root”身份登录而没有任何密码,您将获得所有权限,然后您将在phpmyadim主页上看到用户选项卡

#7


0  

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

如果您不知道root密码然后登录,请按照root密码更改,它对我有用。

To change the mysql password for the root user, do the following:
  1. unload mysqld.nlm
  2. 卸载mysqld.nlm
  3. at the console, type: mysqld_safe --skip-grant-tables --autoclose
  4. 在控制台,键入:mysqld_safe --skip-grant-tables --autoclose
  5. at the server console type mysql
  6. 在服务器控制台类型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提示符。在此提示符下键入以下内容:(其中********是新密码,注意:单引号是必需的)

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

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)

在MySQL 3.22及更高版本中,您可以使用SET PASSWORD语句:(其中********是新密码,注意:单引号是必需的)

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

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)

设置密码的另一种方法是使用mysqladmin命令:(其中********是新密码)

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

shell> mysqladmin -u root密码******** shell> mysqladmin flush-privileges