我刚刚安装完 phpmyadmin。但是,主导航面板中的“用户”或“权限”选项卡似乎丢失了。所以我不能将新用户添加到我的数据库中。知道从哪里开始寻找吗?
11 回答
答案是去127.0.0.1/phpmyadmin
而不是localhost/phpmyadmin
。有用!
它在Privileges
选项卡中
这就是您可以添加新用户的地方
如果您以没有权限的用户身份登录,则会在 phpmyadmin(或功能?谁知道)中出现此错误。解决方案是清除浏览器的 cookie。为获得最佳结果,请在使用时重新启动 mySQL 服务器。
我在 Windows 7 上将 XAMPP 包与 Apache 和 mySQL 一起使用,这对我有用。
在权限选项卡中单击添加新用户
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!
它显然只在你存在的时候出现localhost
。因此,请确保您通过该主机名而不是其他虚拟命名服务器访问它。我遇到了同样的问题,因为我使用local
它设置为别名来访问它localhost
。
我有同样的问题。如果你有CPanel,你可以创建一个用户(和创建DB的地方一样),然后通过Cpanel把用户添加到Database中。
我有同样的问题。我使用的是安装时提示创建的用户名。我正在使用 Crunchbang,一个 Debian 发行版,所以我使用 apt-get 通过命令行安装。当我登录时,用户:字段显示为 username@localhost。我注销并重新登录,但这次我将 root 作为用户名并使用与我的用户帐户相同的密码,并且我获得了访问权限。
如果您使用的是 WHM/cPanel,此选项卡最近已被删除。
我不是在本地主机上而是在bluehost帐户上遇到了同样的问题。出于某种原因,phpMyAdmin 没有 root 访问权限,因此没有权限选项卡。您可以使用 MySQL 数据库而不是 phpMyAdmin 添加用户
执行此步骤并尝试以 root 和新密码登录..
To change the mysql password for the root user, do the following:
- 卸载 mysqld.nlm
- 在控制台输入:mysqld_safe --skip-grant-tables --autoclose
- 在服务器控制台输入 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