title: spark-sql Table or view not found error
body: <p>I'm trying to run a basic java program using spark-sql &amp; JDBC. I'm running into the following error. Not sure what's wrong here. Most of the material I have read does not talk on what needs to be done to fix this problem.</p>
  
  <p>It will also be great if someone can point me to some good material to read on Spark-sql (Spark-2.1.1). I'm planning to use spark to implement ETL's, connecting to MySQL and other datasources.</p>
  
  <p>Exception in thread "main" org.apache.spark.sql.AnalysisException: Table or view not found: <code>myschema.mytable</code>; line 1 pos 21;</p>
  
  <pre><code>    String MYSQL_CONNECTION_URL = "jdbc:mysql://localhost:3306/myschema";
      String MYSQL_USERNAME = "root";
      String MYSQL_PWD = "root";
  
      Properties connectionProperties = new Properties();
      connectionProperties.put("user", MYSQL_USERNAME);
      connectionProperties.put("password", MYSQL_PWD);
  
      Dataset&lt;Row&gt; jdbcDF2 = spark.read()
                .jdbc(MYSQL_CONNECTION_URL, "myschema.mytable", connectionProperties);
      spark.sql("SELECT COUNT(*) FROM myschema.mytable").show();
  </code></pre>