报错:java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: ....................
这个方法有可能只针对我自己有效。记录一下。
解决方法:
//其中的ip不能换成localhost,就是在这里卡了半天。test 表示数据库名
grant all privileges on test.* to root@'ip' identified by "aaa111";
flush privileges;