24

我刚刚安装完 phpmyadmin。但是,主导航面板中的“用户”或“权限”选项卡似乎丢失了。所以我不能将新用户添加到我的数据库中。知道从哪里开始寻找吗?

4

11 回答 11

24

答案是去127.0.0.1/phpmyadmin而不是localhost/phpmyadmin。有用!

于 2014-03-17T10:51:24.590 回答
13

它在Privileges选项卡中

这就是您可以添加新用户的地方

在此处输入图像描述

于 2012-09-22T05:00:08.070 回答
13

如果您以没有权限的用户身份登录,则会在 phpmyadmin(或功能?谁知道)中出现此错误。解决方案是清除浏览器的 cookie。为获得最佳结果,请在使用时重新启动 mySQL 服务器。

我在 Windows 7 上将 XAMPP 包与 Apache 和 mySQL 一起使用,这对我有用。

于 2013-02-18T20:23:43.357 回答
1

在权限选项卡中单击添加新用户

于 2012-09-22T05:09:24.507 回答
1

i just want to share what I found out

Initially, i have users tab in phpmyadmin, now I can only access it thru http://127.0.0.1/phpmyadmin

  • Here's the first thing I think caused me to lose "users" tab

but then i suddenly have my host file modified (in windows "Windows\System32\drivers\etc\hosts")

it says

127.0.0.1 somehostname
#127.0.0.1       localhost
  • Another thing but I doubt if its related

then I changed apache config httpd.conf to open my wamp on the network not just localhost

<Directory "D:/Program Files (x86)/wamp/www/">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks
    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride All
    #
    # Controls who can get stuff from this server.
    #
    # Online --> Require all granted

    #   onlineoffline tag - don't remove

    Require local
    allow from all
</Directory>
  • I reverted hosts file and accessed phpmyadmin using localhost which is = 127.0.0.1 and voila!
于 2013-03-01T07:06:30.763 回答
1

它显然只在你存在的时候出现localhost。因此,请确保您通过该主机名而不是其他虚拟命名服务器访问它。我遇到了同样的问题,因为我使用local它设置为别名来访问它localhost

于 2013-02-02T18:20:25.560 回答
1

我有同样的问题。如果你有CPanel,你可以创建一个用户(和创建DB的地方一样),然后通过Cpanel把用户添加到Database中。

于 2019-11-06T01:56:46.647 回答
0

我有同样的问题。我使用的是安装时提示创建的用户名。我正在使用 Crunchbang,一个 Debian 发行版,所以我使用 apt-get 通过命令行安装。当我登录时,用户:字段显示为 username@localhost。我注销并重新登录,但这次我将 root 作为用户名并使用与我的用户帐户相同的密码,并且我获得了访问权限。

于 2014-03-01T18:02:19.417 回答
0

如果您使用的是 WHM/cPanel,此选项卡最近已被删除。

请参阅:https ://features.cpanel.net/topic/as-an-administrator-i-want-to-manage-table-level-privileges-in-mysql-so-i-dont-need-to-leave- cpanel-whm-for-this-administrative-duty

于 2017-03-02T20:57:17.600 回答
0

我不是在本地主机上而是在bluehost帐户上遇到了同样的问题。出于某种原因,phpMyAdmin 没有 root 访问权限,因此没有权限选项卡。您可以使用 MySQL 数据库而不是 phpMyAdmin 添加用户

于 2016-04-11T18:01:41.840 回答
0

执行此步骤并尝试以 root 和新密码登录..

To change the mysql password for the root user, do the following:
  1. 卸载 mysqld.nlm
  2. 在控制台输入:mysqld_safe --skip-grant-tables --autoclose
  3. 在服务器控制台输入 mysql

这将带您进入 mysql 提示符。在此提示符下键入以下内容:(其中 ******** 是新密码,注意:需要单引号)

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

刷新权限将使更改立即生效。

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

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

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

shell> mysqladmin -u root password ********
shell> mysqladmin flush-privileges
于 2017-07-21T15:32:42.917 回答