Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

java.sql.sqlexception: access denied for user

As you are creating a database from scratch, you could use:

Connection connection = DriverManager.getConnection("jdbc:mysql://localhost/?user=root&password=rootpassword"); 
PreparedStatement ps = connection.prepareStatement("CREATE DATABASE databasename");
int result = ps.executeUpdate();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #access #denied #user
ADD COMMENT
Topic
Name
6+3 =