MySQL PMA 数据库 ... 在 phpMyAdmin 升级中不行

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21033059/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 19:48:13  来源:igfitidea点击:

PMA Database ... not OK in phpMyAdmin upgrade

mysqlphpmyadmin

提问by rpd

I have just been wrangling with phpMyAdmin and MySQL server on my Win8 PC IIS localhost (there was no connection between these, which I think was due to MySQL service not starting so I reinstalled MySQL and reran the config setup and reestablished a connection between them, which fixed that).

我刚刚在我的 Win8 PC IIS localhost 上与 phpMyAdmin 和 MySQL 服务器争论不休(它们之间没有连接,我认为这是由于 MySQL 服务没有启动,所以我重新安装了 MySQL 并重新运行了配置设置并重新建立了它们之间的连接,解决了这个问题)。

However phpMyAdmin advised an update which I did by overwriting the files with the new version and including the previous config file.

但是 phpMyAdmin 建议我通过用新版本覆盖文件并包括以前的配置文件来进行更新。

I now have:
The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. To find out why click here.
and on clicking I get
PMA Database ... not OK [ Documentation ]
General relation features Disabled
When I click the link I get a http 404 page which gives this:

我现在有:
The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. To find out why click here.
点击我得到
PMA Database ... not OK [ Documentation ]
General relation features Disabled
当我点击链接时,我得到一个 http 404 页面,它给出了这个:

Physical path C:\inetpub\wwwroot\phpMyAdmin\pmadb

So what is the pmadb in phpMyAdmin and should I be bothered by this? As it stands I'm a bit fed up at having to have had to spend time tweaking all of this (ie it has not been a smooth trouble free event/install). Is it some DB for the old version or what? I do not think I created it!

那么 phpMyAdmin 中的 pmadb 是什么,我应该为此烦恼吗?就目前而言,我对不得不花时间调整所有这些感到有点厌倦(即,这不是一个顺利的无故障事件/安装)。是旧版本的数据库还是什么?我不认为我创造了它!

I do not feel very bothered by this as hopefully I can setup my databases for my localhost IIS websites and press on with my webdeverry(!) but I don't really like having this unknown error and wouldn't mind fixing it/getting rid of it.

我对此并不感到很困扰,因为希望我可以为我的 localhost IIS 网站设置我的数据库并继续使用我的 webdeverry(!) 但我真的不喜欢这个未知错误并且不介意修复它/摆脱它其中。

采纳答案by rpd

There are a few google links on this same issue that I have followed that have helped me fix this (I should have spent more time googling before posting!). So to solve the problem I needed to create a phpmyadmin database and import create_tables.sql and assign a new user with full privileges and then uncomment the config.inc.php file at:

在我关注的同一问题上,有一些谷歌链接帮助我解决了这个问题(我应该在发布之前花更多的时间在谷歌上搜索!)。所以为了解决这个问题,我需要创建一个 phpmyadmin 数据库并导入 create_tables.sql 并分配一个具有完全权限的新用户,然后取消注释 config.inc.php 文件:

/* User used to manipulate with storage */ $cfg['Servers'][$i]['controlhost'] = ''; $cfg['Servers'][$i]['controluser'] = 'phpmyadmin';

/* User used to manipulate with storage */ $cfg['Servers'][$i]['controlhost'] = ''; $cfg['Servers'][$i]['controluser'] = 'phpmyadmin';

and uncomment lines below

并取消注释下面的行

/* Storage database and tables */ $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';

/* Storage database and tables */ $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';

I also needed to add some lines from the new version config.sample.incThere was a good link describing this I wanted to save but I had to clear my browser cache to reload localhost/phpMyAdmin and in doing so I lost my history & that link!

我还需要从新版本中添加一些行config.sample.inc有一个很好的链接描述了我想保存但我必须清除浏览器缓存以重新加载 localhost/phpMyAdmin 这样做我丢失了我的历史记录和那个链接!

I know this explanation is not exactly described but I hope it may help anyone else who gets a similar issue after updating phpMyAdmin. I'm still not sure what all these features do but it is all fixed now, thanks!

我知道这个解释没有完全描述,但我希望它可以帮助任何在更新 phpMyAdmin 后遇到类似问题的人。我仍然不确定所有这些功能的作用,但现在都已修复,谢谢!

回答by Roberto Shimokawa

As I'm not very good in English I used google translator, so any error I'm sorry ;)

由于我的英语不是很好,所以我使用了谷歌翻译器,所以我很抱歉有任何错误;)

Hello, I had this same problem and the solution:

你好,我遇到了同样的问题和解决方案:

After setting all phpmmyadmin, you need to run the file "create_tables" in the phpmyadmin sql console itself, found at: phpmyadmin\sql\create_tables.sql

设置完所有 phpmmyadmin 后,您需要在 phpmyadmin sql 控制台本身中运行文件“create_tables”,可在以下位置找到: phpmyadmin\sql\create_tables.sql

After creating it you need to configure the file "config.inc", found on the phpmyadmin folder. In it you include the following information equal to file "config.sample.inc" which is an example.

创建后,您需要配置文件“config.inc”,该文件位于 phpmyadmin 文件夹中。在其中包含以下信息,等同于文件“config.sample.inc”,这是一个示例。

/* User used to manipulate with storage */
$cfg['Servers'][$i]['controlhost'] = 'localhost';
$cfg['Servers'][$i]['controluser'] = 'user';
$cfg['Servers'][$i]['controlpass'] = 'password';

/* Storage database and tables */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['relation'] = 'pma__relation';
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';

Edit :( suggested by @Greeso)

编辑:@Greeso建议)

For new versions, you should also add :

对于新版本,您还应该添加:

$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';


Done, exit and reenter the session.

完成,退出并重新进入会话。

回答by Iceman

Quick fixing script that does the job in one command:

在一个命令中完成工作的快速修复脚本:

curl -O -k https://raw.githubusercontent.com/skurudo/phpmyadmin-fixer/master/pma.sh && chmod +x pma.sh && ./pma.sh

Read through the actual code in this repo link

通读此repo 链接中的实际代码

回答by Tom

I have found that there is another cause for this issue. If when you create the pmauser for phpmyadmin to use, if you forget to assign that user rights to the schema that permit modifying the phpmyadmin database, you'll get the same messages. The good news is that if you've logged in with root or similar privileges, you can just allow the pmauser to have select, insert, delete on the phpmyadmin schema and the problem should be fixed.

我发现这个问题还有另一个原因。如果您在创建供 phpmyadmin 使用的 pmauser 时,如果您忘记将该用户权限分配给允许修改 phpmyadmin 数据库的架构,您将收到相同的消息。好消息是,如果您使用 root 或类似权限登录,您可以只允许 pmauser 在 phpmyadmin 模式上进行选择、插入、删除,问题应该得到解决。

回答by blamb

For me the db phpmyadmin was missing, you can find the file create_tables.sql inside the phpmyadmin installation in the sql/directory. You can use this file to rebuild your table.

对我来说,db phpmyadmin 丢失了,您可以在 phpmyadmin 安装sql/目录中找到文件 create_tables.sql 。您可以使用此文件来重建您的表。

From the command line, you can import that sql file. # mysql -u root < create_tables.sql

从命令行,您可以导入该 sql 文件。 # mysql -u root < create_tables.sql

Be careful this will probably overrwrite your data, dont run it until you move your old phpmyadmin table, if you have one intact already.

小心这可能会覆盖你的数据,在你移动旧的 phpmyadmin 表之前不要运行它,如果你已经有一个完整的表。