phpMyAdmin 加载 innoDB 数据库主页时非常慢

问题描述 投票:0回答:2

我遇到的问题:

我从 phpMyAdmin 中加载我的 innoDB 数据库之一的数据库页面,它加载速度非常慢。我们说的是最多 5 分钟的加载时间。这只发生在主页上,也就是说,当您查看数据库时,显示所有表格的左侧边栏就会出现。

在初始加载时间之后,可以单击每个单独的表格并几乎立即加载。但这些表是在 iframe 中加载的,而无需重新加载数据库表的左侧边栏,这就是它们加载如此快的原因。

在初始加载时间之后,每个单独的表都可以立即在新选项卡/窗口中打开,但这样做不包括数据库表的左侧边栏,我确信这就是它们加载如此快的原因。

我期望发生的事情:

我希望能够从 phpMyAdmin 中加载我的 innoDB 数据库的主页,而无需花费 5 分钟来加载。

我尝试过的:

这个问题我已经困扰好几个月了,每天都让我发疯。事实上我已经接受了它。我只是每天立即加载该初始页面,然后去做其他事情,这样我就不必观看它,因为它只会让我生气。

我将超时设置为大约 15 分钟,因此,如果我认为时间超过 10 分钟,我将在另一个选项卡中打开显示“localhost”的位置,这会将我带到登录屏幕,重新登录,然后它把我带到了数据库列表,加载速度很快。这是因为,如果我只是加载该主页,然后登录,它会将我带回该索引页面,并且我将再等待 5 分钟才能加载。呃..

好吧,我在 Google 上搜索了一遍,发现了很多关于让 innoDB 不进行行计数之类的建议。我已经尝试过所有这些。什么都不起作用! :(

我发现了一个名为“$cfg['Server']['IgnoreSomeISrows'] = true;”的东西这没有任何帮助。我什至不知道它做了什么,但它不起作用,所以我删除了它,但我忘记删除该部分,所以我就把它留在那里。不,评论它也没有帮助,谢谢。

一些版本信息:

操作系统

CentOS release 6.5 (Final)

数据库:

Server: Localhost via UNIX socket
Software: MySQL
Software version: 5.1.71-log - Source distribution
Protocol version: 10

网络服务器

Apache/2.2.15 (CentOS)
Database client version: libmysql - 5.1.71
PHP extension: mysqli Documentation

phpMyAdmin

Version information: 3.5.8.2, latest stable version: 4.1.5
php mysql database apache phpmyadmin
2个回答
10
投票

当我打开“查看”表时,我还遇到了 phpMyAdmin 响应时间极其缓慢的情况。我所做的是将phpMyAdmin升级到最新版本,然后我的问题就解决了。也许您可以尝试一下 phpMyAdmin v.4 或更高版本。


7
投票

谢谢 Tom Kim 带领我找到答案。

评论中没有足够的空间,因此我将详细说明我为解决问题所做的具体操作。我不知道为什么 phpMyAdmin 的 yum 版本让我苦恼。

  1. 备份您的配置文件(如果您已经制作了)
  2. 删除
    phpMyAdmin
    yum版本(有2个不同的版本)
  3. 从他们的网站下载最新版本的 phpMyAdmin
  4. 解压缩并将其移至正常位置
  5. 替换(或创建)配置文件
  6. 为其添加虚拟主机条目,并确保限制对您的访问仅您的 IP 地址出于安全目的
  7. 重新启动阿帕奇
  8. 喝点龙舌兰酒庆祝一下!最好是reposado,因为它是最好的类型:)(这部分非常重要)

这是我的 bash 形式的答案:

(我假设你已经安装并配置了 phpMyAdmin 或 phpmyadmin...我不会给你配置文件,但我会给你 vhost 文件,它主要基于 phpMyAdmin 的 yum 版本中的文件)

mkdir /tmp/phpMyAdminNew;
cp /usr/share/phpMyAdmin/config.inc.php /tmp/phpMyAdminNew/config.inc.php;
yum remove phpMyAdmin phpmyadmin;
cd /tmp;
wget -O /tmp/phpMyAdminNew/phpMyAdmin-4.1.5-all-languages.zip http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/4.1.5/phpMyAdmin-4.1.5-all-languages.zip;
unzip -d /tmp/phpMyAdminNew /tmp/phpMyAdminNew/phpMyAdmin-4.1.5-all-languages.zip;
mv /tmp/phpMyAdminNew/phpMyAdmin-4.1.5-all-languages /usr/share/phpMyAdminNew
cp /tmp/phpMyAdminNew/config.inc.php /usr/share/phpMyAdminNew/config.inc.php
echo -e 'Alias /my_secret_phpmyadmin_portal /usr/share/phpMyAdminNew\n\n<Directory /usr/share/phpMyAdminNew/>\n\t<IfModule mod_authz_core.c>\n\t\t# Apache 2.4\n\t\t<RequireAny>\n\t\t\tRequire ip 127.0.0.1\n\t\t\tRequire ip ::1\n\t\t\t# Require ip xxx.xxx.xxx.xxx\n\t\t</RequireAny>\n\t</IfModule>\n\t<IfModule !mod_authz_core.c>\n\t\t# Apache 2.2\n\t\tOrder Deny,Allow\n\t\tDeny from All\n\t\tAllow from 127.0.0.1\n\t\tAllow from ::1\n\t\t# Allow from xxx.xxx.xxx.xxx\n\t</IfModule>\n</Directory>\n\n<Directory /usr/share/phpMyAdminNew/setup/>\n\t<IfModule mod_authz_core.c>\n\t\t# Apache 2.4\n\t\t<RequireAny>\n\t\t\tRequire ip 127.0.0.1\n\t\t\tRequire ip ::1\n\t\t\t# Require ip xxx.xxx.xxx.xxx\n\t\t</RequireAny>\n\t</IfModule>\n\t<IfModule !mod_authz_core.c>\n\t\t# Apache 2.2\n\t\tOrder Deny,Allow\n\t\tDeny from All\n\t\tAllow from 127.0.0.1\n\t\tAllow from ::1\n\t\t# Allow from xxx.xxx.xxx.xxx\n\t</IfModule>\n</Directory>\n\n# These directories do not require access over HTTP - taken from the original\n# phpMyAdmin upstream tarball\n\n<Directory /usr/share/phpMyAdminNew/libraries/>\n\tOrder Deny,Allow\n\tDeny from All\n\tAllow from None\n</Directory>\n\n<Directory /usr/share/phpMyAdminNew/setup/lib/>\n\tOrder Deny,Allow\n\tDeny from All\n\tAllow from None\n</Directory>\n\n<Directory /usr/share/phpMyAdminNew/setup/frames/>\n\tOrder Deny,Allow\n\tDeny from All\t\nAllow from None\n</Directory>\n\n# This configuration prevents mod_security at phpMyAdmin directories from\n# filtering SQL etc.  This may break your mod_security implementation.\n#\n#<IfModule mod_security.c>\n#\t<Directory /usr/share/phpMyAdminNew/>\n#\t\tSecRuleInheritance Off\n#\t</Directory>\n#</IfModule>' > /etc/httpd/conf.d/phpMyAdminNew.conf;
rm -rf /tmp/phpMyAdminNew
service httpd graceful
clear; echo -e '\n\n##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~##\n ##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~##\n  ##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~##\n   ##~~~~~~~~~~~~~~~~~~~~~~~~~~~##\n    ##~~~~~~~~~~~~~~~~~~~~~~~~~##\n     ##~~~~~~~~~~~~~~~~~~~~~~~##\n      ##~~~~~~~~~~~~~~~~~~~~~##\n       ##~~~~~~~~~~~~~~~~~~~##\n        ###~~~~~~~~~~~~~~~###\n         ####~~~~~~~~~~~####\n          #####~~~~~~~~#####\n          ##################\n          ## TEQUILA SHOT ##\n          ##################\n\n';
© www.soinside.com 2019 - 2024. All rights reserved.