我无法在xampp中连接到我的MySQL我有这个错误:
MySQL说:文档
1045 - 用户'root'@'localhost'拒绝访问(使用密码:否)
mysqli_real_connect():( HY000/1045):拒绝访问用户'root'@'localhost'(使用密码:NO)phpMyAdmin尝试连接MySQL服务器,服务器拒绝连接.您应该检查配置中的主机,用户名和密码,并确保它们对应于MySQL服务器管理员提供的信息.
CONFIG.INC.PHP文件
<?php
/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */
/*
* Servers configuration
*/
$i = 0;
/*
* First server
*/
$i++;
/* 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 …Run Code Online (Sandbox Code Playgroud)