警告:mysqli_connect():(HY000/1045):用户'record'@'localhost'的访问被拒绝(使用密码:YES)[重复]
Posted
技术标签:
【中文标题】警告:mysqli_connect():(HY000/1045):用户\'record\'@\'localhost\'的访问被拒绝(使用密码:YES)[重复]【英文标题】:Warning: mysqli_connect(): (HY000/1045): Access denied for user 'record'@'localhost' (using password: YES) [duplicate]警告:mysqli_connect():(HY000/1045):用户'record'@'localhost'的访问被拒绝(使用密码:YES)[重复] 【发布时间】:2021-04-24 11:17:54 【问题描述】:警告:mysqli_connect(): (HY000/1045): Access denied for user 'record'@'localhost' (using password: YES) in C:\xampp\htdocs\mynk\config.php on line 7
【问题讨论】:
您在 config.php 文件中输入了错误的 localhost 服务器密码 【参考方案1】:你创建记录用户了吗?
CREATE USER 'record'@'localhost';
GRANT ALL PRIVILEGES ON your_database_name.* To 'record'@'localhost' IDENTIFIED BY 'your_password';
FLUSH PRIVILEGES;
或者您可以将“记录”用户更改为“根”用户
参考:Create new user in MySQL and give it full access to one database
【讨论】:
以上是关于警告:mysqli_connect():(HY000/1045):用户'record'@'localhost'的访问被拒绝(使用密码:YES)[重复]的主要内容,如果未能解决你的问题,请参考以下文章
警告:mysqli_connect(): (HY000/2002): 没有这样的文件或目录
警告:mysqli_connect(): (HY000/1049): 仅在 mac 终端中的未知数据库
我该如何解决这个“警告:mysqli_connect():(HY000/1049):未知数据库”问题?
警告:mysqli_connect():(HY000/2002):无法建立连接,因为目标机器在[重复]中主动拒绝了它
Mysql 警告:mysqli_connect(): (HY000/2002): No such file or directory in
mysqli_connect(): (HY000/1045): Access denied for user ... - mysql shell 工作 [重复]