java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)
问题 I'm having troubles with my project , it involves JDBC and Mysql connection . When I do the following : private Statement m_statement = null; // statement private Connection m_connection = null; // connection /** * Constructor #1 of the Database class * @throws ClassNotFoundException */ public Database() throws ClassNotFoundException { try { Class.forName("com.mysql.jdbc.Driver"); MysqlDataSource ds = new MysqlConnectionPoolDataSource(); ds.setServerName("localhost"); ds.setPort(3306); ds