mysql联网问题主机local不能连接_主机“ localhost”不允许连接到此MySQL服务器(#1130)...

bd96500e110b49cbb3cd949968f18be7.png

Ok I'm asking this question since I tried looking for an answer for the last 4 hours.

I don't even know what I did in the server that it won't allow me to connect from the local host. but even after installing anything related to the mysql installation and reinstalling only the server it won't let me connect.

when I try to configure the server after I just installed it on the apply security settings it fails and give me that error.

My server is installed on a regular PC and not on any website, the PC runs a win 7 and I tried the skip-grant-tables option as well as the removing the registry keys after uninstalling the server.

Please if anyone has any other option for me to use or if you think I did something wrong in these other options please tell me how can I fix that doing the right thing and how to do that.

解决方案

I also had this same problem when installing a new version of mysql5.5, but i solved it.

If you go through the path mysql was installed in, in windows your windows system, "c:\mysqlinstalllocation\bin"

you can run the mysql query from this directory,

but if you have already added the mysql command to the path option in windows, in environment variables, which will help you run custom commands form the command line, you can run it directly from any directory in the command prompt.

Just add the "skip-grant-tables" command under the [mysqld] heading in the mysql.ini file, and make sure to restart your server after doing this, and run mysql, it will work. At this point you will login without any password, so it's advisable to delete the password at this point, so you can login easily after you've uncomment the skip-grant-tables" command

And after you've removed the password from the root user, make sure to remove the "skip-grant-tables" command, or comment it out, with #, then restart your server. It will work.

Now you can login without any password, and run the grant command, and set any password you like.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值