Home  >  Q&A  >  body text

java程序通过外网的ip连接数据库

怎么连接呢?并且那个数据库服务器防火墙已经关闭且提供了端口号,但是在项目启动到springScurty是就一直等待,这是为啥啊,。有没有认遇到过?

迷茫迷茫2742 days ago519

reply all(4)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-04-18 10:58:27

    Just throw an exception and see what the reason is

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-18 10:58:27

    Post the error so it’s easier to analyze the problem

    reply
    0
  • PHPz

    PHPz2017-04-18 10:58:27

    Why not install PLSQL or TOAD on the development machine now, test that the network is smooth, and then connect to the Java database? If you use MYCLIPSE, it comes with DATABASE EXPLORER, you can test it directly first

    reply
    0
  • PHPz

    PHPz2017-04-18 10:58:27

    I don’t know if yours is mysql. Mysql requires some permission processing for your sql access account. Change the previous 127.0.0.1@username to %@username to access the local mysql database through the external network.

    reply
    0
  • Cancelreply