gpt4 book ai didi

mysql - 通过远程phpMyAdmin远程访问MySql

转载 作者:行者123 更新时间:2023-11-30 22:52:56 24 4
gpt4 key购买 nike

我在 linux 远程机器上有一个带有 MySQL 的 phpMyAdmin,我可以使用浏览器毫无问题地连接到它。

但是当我尝试从我机器上的 .NET 程序连接 MySQL 中的数据库时,我收到一条错误消息:

Authentication to host 'theIpNumber' for user 'newUserName' using method 'mysql_native_password' failed with message: Access denied for user 'newUserName'@'myMachineName' (using password: YES)

我试着像这里解释的那样配置它:http://www.devside.net/wamp-server/accessing-mysql-or-phpmyadmin-from-outside在 phpMyAdmin 中创建一个带密码的新用户并更改 config.inc.php

然后在我的 app.config 中我有连接字符串:

connectionString="server=theIpNumber;UserId=newUserName;Password=newUserPassword;database=theDB"

但是当我运行我的程序时仍然收到同样的错误信息。知道如何解决这个问题吗?

最佳答案

最后我解决了这个问题,在 phpMyAdmin 中添加了另一个具有相同名称“newUserName”和密码以及主机值“%”的用户

关于mysql - 通过远程phpMyAdmin远程访问MySql,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27564505/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com