asp连接远程mysql,无法连接到远程Asp.Net MySQL服务器

I needed to connect to MYSQL databases via asp.net. I am using MySQL Connector to make connection with database but while doing this I am having this Error:

WVItR.jpg

Authentication with old password no longer supported, use 4.1 style passwords.

解决方案

From MySQL 4.1 and higher they use a new protocol that is not compatible with earlier versions. Which is why when you upgrade the server from an earlier version to 4.1 or higher you receive the authentication error message.

If you need to connect to the database with both clients before and after version 4.1 you must have two passwords stored. One the old way and one the new way.

You can set a users password to the new way using:

SET PASSWORD for = PASSWORD('new password')

SET PASSWORD FOR 'steve'@'10.15.2.67' = PASSWORD('my secure password');

If needed you can also set passwords to the old way using:

SET PASSWORD for = OLD_PASSWORD('new password')

SET PASSWORD FOR 'steve'@'10.15.2.67' = OLD_PASSWORD('my secure password');

There is a great page in the MySQL manual which will detail the process

You can actually for the server if newer than 4.1 to still use the old password method however this isn't recommended.

To do this, you can start the server with the --old-passwords option.

So, either the server has updated and you're using a old client - or you've updated your client (which now uses the new password system) and your connecting to a server below 4.1

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值