用root登陆mysql ,修改user表你的localhost值为%

解决方案 »

  1.   

    我已经加了一条记录100.100.100.110 用户名为lsh密码:lsh这样不对吗?
      

  2.   

    Connection = DriverManager.getConnection("jdbc:mysql://100.100.100.111:3306/fotc", lsh, lsh);
      

  3.   

    不行,这种方法我试过了,我照你刚说的方法试了一下把 user 表中的host 字段为"localhost"改为了“%”还是不行错误为
    error:java.sql.SQLException: Server configuration denies access to data source
    麻烦你给看一下