当我访问网页 http://localhost/phpmyadmin 时,它显示
The localhost page isn’t working
localhost is currently unable to handle this request.
HTTP ERROR 500
Apache 错误日志为:
[Tue Jun 14 16:35:47.699632 2016] [:error] [pid 14660] [client 192.168.0.101:44854] PHP Fatal error: require_once(): Failed opening required '/usr/share/php/php-gettext/gettext.inc' (include_path='.:/usr/share/php') in /usr/share/phpmyadmin/libraries/select_lang.lib.php on line 477
phpmyadmin 内部也显示此错误:
Connection for controluser as defined in your configuration failed.
请帮忙!
答案1
配置中定义的 controluser 连接失败
原因:数据库用户不匹配。有几种修复方法。执行以下命令:
sudo dpkg-reconfigure phpmyadmin
phpmyadmin 软件包包含为您执行此操作的脚本,它所需要的只是具有权限的用户。sudo
当然,如果您以 root 身份登录,则不需要。可能值得尝试删除当前的 phpmyadmin 用户。
或: 签到/etc/phpmyadmin/config-db.php
$dbuser='root';
$dbpass='password'; // set current password between quotes ' '
$basepath='';
$dbname='phpmyadmin';
$dbserver='';
$dbport='';
$dbtype='mysql';