代码之家  ›  专栏  ›  技术社区  ›  Amit

我们通过phpMyAdmin访问的mysql数据库的数据库URL是什么?

  •  -1
  • Amit  · 技术社区  · 15 年前

    我正在写一个访问MySql数据库的代码。数据库位于我们通过web浏览器访问的服务器上

    比如说,

    URL: http://cbm.goo.com/phpMyAdmin

    Username: username

    Password: password

    以上用户名和密码用于通过web浏览器访问MySql数据库。

    Q1. 要在中使用的数据库的数据库url是什么 JDBC 编程?

    jdbc:mysql://cbm.goo.com:3306/scores?user=username&password=password

    ===============================编辑===================================

    我得到以下错误:

    Communications link failure

    The last packet successfully received from the server was 1,267,163,244,109 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago.

    2 回复  |  直到 4 年前
        1
  •  3
  •   bunn_online    15 年前

    一些公司对哪些端口可以使用设置了限制。Web服务器使用端口80,该端口通常打开以允许Web浏览。您的MySQL服务器正在使用端口3306。