I can#39;t access XAMPP phpMyAdmin; it says: Error MySQL said: Documentation Cannot connect: invalid settings(我无法访问 XAMPP phpMyAdmin;它说:错误 MySQL 说:文档无法连接:无效的设置)
问题描述
完整的错误信息:
Error
MySQL said: Documentation
Cannot connect: invalid settings.
Connection for controluser as defined in your configuration failed.
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
到目前为止,我一直在使用网络托管站点;这可能弄乱了我的 xampp 连接.我的phpMyAdminconfig.in.php"文件设置如下:
I have been using a web hosting site sever so far; this may have messed up my xampp connection. My phpMyAdmin "config.in.php" file is set up as follows:
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';
/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
我可以在localhost:8080"上运行我使用 xampp 创建的 php 代码,但我无法访问 mysql.我的数据库连接配置如下:
I am able to run the php codes that I have created using xampp at "localhost:8080", but I can't access mysql. My database connection configuration is as follows:
// Databse Connection Constants
define('DB_HOST','localhost');
define('DB_USER','root');
define('DB_PASS',','');
define('DB_NAME','gallery_db');
有人可以帮忙吗?谢谢.
Can anyone help? Thanks.
推荐答案
我在 StackOverflow 中找到了答案.在config.inc.php"中文件,我将配置"更改为cookie".这是从 StackOverflow 引用的答案:
I found the answer in StackOverflow. In "config.inc.php" file, I changed 'config' to 'cookie'. Here is the answer quoted from StackOverflow:
第 1 步:
找到phpMyAdmin的安装路径.
Locate phpMyAdmin installation path.
第 2 步:
在您喜欢的文本编辑器中打开 phpMyAdmin>config.inc.php.
Open phpMyAdmin>config.inc.php in your favourite text editor.
第 3 步:
搜索$cfg['Servers'][$i]['auth_type'] = 'config';
将其替换为 $cfg['Servers'][$i]['auth_type'] = 'cookie';
这篇关于我无法访问 XAMPP phpMyAdmin;它说:错误 MySQL 说:文档无法连接:无效的设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:我无法访问 XAMPP phpMyAdmin;它说:错误 MySQL 说:文档无法连接:无效的设置
基础教程推荐
- phpmyadmin 错误“#1062 - 密钥 1 的重复条目‘1’" 2022-01-01
- Doctrine 2 - 在多对多关系中记录更改 2022-01-01
- 如何在 XAMPP 上启用 mysqli? 2021-01-01
- 如何在 Symfony 和 Doctrine 中实现多对多和一对多? 2022-01-01
- 在 CakePHP 2.0 中使用 Html Helper 时未定义的变量 2021-01-01
- 找不到类“AppHttpControllersDB",我也无法使用新模型 2022-01-01
- HTTP 与 FTP 上传 2021-01-01
- PHP 守护进程/worker 环境 2022-01-01
- 使用 PDO 转义列名 2021-01-01
- 在 yii2 中迁移时出现异常“找不到驱动程序" 2022-01-01