简体   繁体   English

MySQL错误连接到数据库

[英]Mysql error connecting to DB

I tried everything I saw in 50 pages of searching. 我尝试了50页搜索中看到的所有内容。 I am getting really hot headed over this. 我对此感到非常热。 I reinstalled my machine and from now on Mysql just doesn't want to connect. 我重新安装了机器,从现在开始,Mysql只是不想连接。

"Warning: mysqli_connect(): (HY000/1045): Access denied for user".

Tried going into the ini file, SQL commands GRANT and whatever you can think of. 尝试进入ini文件,SQL命令GRANT和您能想到的任何东西。 I can't connect to the damn thing. 我无法连接到该死的东西。 Can someone help? 有人可以帮忙吗?

尝试以root用户身份查看是否可行。

Create a new user using this code: 使用此代码创建一个新用户:

GRANT SELECT ON test.* TO pesho124@'localhost' IDENTIFIED BY 'maina123'; 

and see if that works. 看看是否可行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM