SHARE
TWEET

Untitled

a guest Aug 18th, 2018 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. error connecting to mysql using java
  2. String url = "jdbc:mysql://localhost:3306/";
  3.     String dbName = "mta_db";
  4.     String driver = "com.mysql.jdbc.Driver";
  5.     String userName = "tomcat";
  6.     String password = "tomcat";
  7.     try {
  8.         Class.forName(driver).newInstance();
  9.         _conn = DriverManager.getConnection(url + dbName, userName, password);
  10.     } catch (Exception e) {
  11.         e.printStackTrace();
  12.     }
  13.    
  14. GRANT ALL ON mta_db.* to tomcat@'%' identified by 'yourpassword';
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top