Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Please remove the table name from the connection string.</p> <p>just write</p> <pre><code>Connection conn = DriverManager.getConnection("jdbc:mysql://mysql2.000webhost.com/a4931569_users", username, pass); </code></pre> <p>JDBC URL Format</p> <p>The JDBC URL format for MySQL Connector/J is as follows, with items in square brackets ([, ]) being optional:</p> <pre><code>jdbc:mysql://[host][,failoverhost...][:port]/[database] » [?propertyName1][=propertyValue1][&amp;propertyName2][=propertyValue2]... </code></pre> <p>If the host name is not specified, it defaults to 127.0.0.1. If the port is not specified, it defaults to 3306, the default port number for MySQL servers.</p> <pre><code>jdbc:mysql://[host:port],[host:port].../[database] » [?propertyName1][=propertyValue1][&amp;propertyName2][=propertyValue2]... </code></pre> <p>Here is a sample connection URL:</p> <pre><code>jdbc:mysql://localhost:3306/sakila?profileSQL=true </code></pre> <p>Please refer <a href="http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-configuration-properties.html" rel="nofollow">http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-configuration-properties.html</a></p> <p><strong>Edit</strong></p> <p>In case of </p> <p><code>It says: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure</code> </p> <p>you need to go with answer of Math.</p> <p>MySQL from 000webhost doesn't allow you to connect from external applications, just from within pages hosted in their domain.</p> <p>Please check: <a href="http://www.000webhost.com/faq.php?ID=27" rel="nofollow">How can I connect to MySQL from my computer?</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload