用java调用FrNet的.frx模板报错

本文记录了在安装两个不同端口的Mysql数据库(3306和3307)且密码不同时,遇到的AuthenticationFailed错误。解决方法是在C#连接字符串中添加对应端口(如dataBaseUrl: server=127.0.0.1;userid=root;password=Pglpc;database=db;port=3307)。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Authentication to host 'XXX' for user 'root' using method 'mysql_native_password' failed with message: Access denied for user 'root'@'XXX' (using password: YES)
   在 MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.AuthenticationFailed(Exception ex)
   在 MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.ReadPacket()
   在 MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.Authenticate(Boolean reset)
   在 MySql.Data.MySqlClient.NativeDriver.Open()
   在 MySql.Data.MySqlClient.Driver.Open()
   在 MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings)
   在 MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
   在 MySql.Data.MySqlClient.MySqlPool.TryToGetDriver()
   在 MySql.Data.MySqlClient.MySqlPool.GetConnection()
   在 MySql.Data.MySqlClient.MySqlConnection.Open()
   在 FastReport.Data.DataConnectionBase.OpenConnection(DbConnection connection)
   在 FastReport.Data.DataConnectionBase.FillTableData(DataTable table, String selectCommand, CommandParameterCollection parameters)
   在 FastReport.Data.DataConnectionBase.BopgwNjUS3S(TableDataSource source)
   在 FastReport.Data.TableDataSource.LoadData(ArrayList rows)
   在 FastReport.Data.DataSourceBase.UBPMnFVulJ()
   在 FastReport.Data.DataSourceBase.cdWM3etQ0Z(Relation  , String  , SortCollection  , Boolean  )
   在 FastReport.Data.DataSourceBase.gktMtCFNfX(DataSourceBase  , String  , SortCollection  , Boolean  )
   在 FastReport.DataBand.InitDataSource()
   在 FastReport.Engine.ReportEngine.MmDTF7RTfA(DataBand  )
   在 FastReport.Engine.ReportEngine.PvCTCcLIUq(BandCollection  )
   在 FastReport.Engine.ReportEngine.aDxTc3ronH(ReportPage  )
   在 FastReport.Engine.ReportEngine.dxITub32OO()
   在 FastReport.Engine.ReportEngine.mSeTn9jFBu(ReportPage  )
   在 FastReport.Engine.ReportEngine.TUbTVBZ9ep(Boolean  , Boolean  , Boolean  , ReportPage  )
   在 FastReport.Engine.ReportEngine.ciBTD4Lgey(Boolean  , Boolean  , Boolean  )
   在 FastReport.Report.Prepare(Boolean append)
   在 FastReport.Report.Prepare()
   在 FastReport.Report.Print()
   在 Printer.Program.Main(String[] args)

记录一下 我是因为安装了俩个数据库  一个3306 一个3307,俩个库的密码不一样。导致的报错。

不是因为没有权限的问题 因为我的客户端在别的电脑上就能打开连接Mysql!!!

我用的是mysql5.7!如果是8.0 版本以上的推荐看这里uthentication to host '10.0.1.33' for user 'root' using method 'mysql_native_password' failed with message: Access denied for user 'root'@'PCName' (using password: YES) - quanzhan - 博客园 (cnblogs.com)icon-default.png?t=M4ADhttps://www.cnblogs.com/code1992/p/12161845.html

只需要在给打印机传入参数dataBaseUrl的时候 加上 port 就好了

例如

dataBaseUrl:

server=127.0.0.1;user id=root;password=Pglpc;database=db;port=3307

 这里是C#连接

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

秋迟言说

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值