phpmyadmin没有mysql数据库

发布于 2024-10-06 00:18:45 字数 301 浏览 1 评论 0原文

使用phpmyadmin时,没有mysql数据库。

当我运行 SQL 语句:SHOW PROCESSLIST 时,出现此错误:

#1227 - Access denied; you need the PROCESS privilege for this operation

如果我尝试创建用户,则无法创建,因为没有 mysql 数据库用户表。如果我尝试创建数据库,它会说我不能,因为我没有具有足够高级权限的用户。我也无法向我的无密码用户授予权限。

我做错了什么?

While using phpmyadmin, there is no mysql database.

When I run an SQL statement: SHOW PROCESSLIST I get this error:

#1227 - Access denied; you need the PROCESS privilege for this operation

If I try to create a User, I can't because there is no mysql database users table. If I try to create a database, it says I can't because I don't have user with advanced enough permissions. I can't grant permissions to my passwordless user either.

What am I doing wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

热鲨 2024-10-13 00:18:45

我注意到它很旧,但是...
使用 phpMyAdmin 3.4.8 进行测试

使用 phpMyAdmin 或您拥有的其他 MySQL 客户端尝试此 SQL:

SELECT SCHEMA_NAME AS `Database` FROM INFORMATION_SCHEMA.SCHEMATA;

如果您能够使用此命令列出数据库,请将以下行添加到您的 config.inc.php

$cfg['Servers'][$i]['ShowDatabasesCommand'] = 'SELECT SCHEMA_NAME AS `Database` FROM INFORMATION_SCHEMA.SCHEMATA';

I noticed it's old, but...
Tested with phpMyAdmin 3.4.8

Try this SQL using phpMyAdmin or other MySQL client you have:

SELECT SCHEMA_NAME AS `Database` FROM INFORMATION_SCHEMA.SCHEMATA;

If you are able to list the databases with this, add the following line to your config.inc.php:

$cfg['Servers'][$i]['ShowDatabasesCommand'] = 'SELECT SCHEMA_NAME AS `Database` FROM INFORMATION_SCHEMA.SCHEMATA';
甜警司 2024-10-13 00:18:45

为什么 phpmyadmin 不显示 mysql 数据库?

因为您没有以 root 用户身份登录。也许你忘记了在设置mysql时设置了root密码?当您使用 root 密码登录 phpmyadmin 时,应显示下表:

cdcol
data
information_schema
mysql
performance_schema
phpmyadmin
webauth

这些数据库是在您安装 mysql 时自动创建的,如果您使用 user='admin' 和 password= 登录,则这些数据库可能会丢失。 '' 凭据。或者,如果您使用几乎无权查看或执行任何操作的用户登录。

如果您设置了 root 密码但忘记了,可以重置它

http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html

如果以上方法都不起作用:

吹走你的mysql安装又做了一遍,这次注意每一个安装步骤。当它提示您输入 root 密码时,要么将其写在手上,要么认真质疑您成为一名注重细节的程序员的决定。

Why does phpmyadmin not reveal a mysql database?

Because you are not logged in as the root user. Perhaps you forgot that you set a root password when you were setting up mysql? When you login to phpmyadmin with your root password, the following tables should be shown:

cdcol
data
information_schema
mysql
performance_schema
phpmyadmin
webauth

These databases are auto-created when you install mysql may appear to be missing if you are logging in with the user='admin' and password='' credentials. Or if you are logging in with a user with almost no rights to see or do anything.

If you set your root password and forgot it, you can reset it

http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html

If none of the above works:

Blow away your mysql installation and do it again, this time pay attention to every installation step. When it prompts you for a root password, either write it down on your hand or seriously question your decision to be a programmer who pays attention to detail.

南…巷孤猫 2024-10-13 00:18:45

仅仅因为您的用户 ID 在 mysql 服务器上没有 PROCESS 权限,我猜它是共享主机?

如果您使用的是 Windows 平台,请打开 cmd,然后导航到 MySQL 安装文件夹,然后键入:

C:\ cd bin
C:\ mysql -uroot -p
-- enter your password
mysql> GRANT PROCESS ON your_db_name.* TO your_username@localhost IDENTIFIED BY your_password 

Simply because your user id doesn't have PROCESS privilege on the mysql server, I'm guessing it's a shared hosting?

If you are on windows platform, open your cmd, then navigate to your MySQL installation folder then type:

C:\ cd bin
C:\ mysql -uroot -p
-- enter your password
mysql> GRANT PROCESS ON your_db_name.* TO your_username@localhost IDENTIFIED BY your_password 
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文