Connections could not be acquired from the underlying database!

Connections could not be acquired from the underlying database!

 

以上问题可能有一下缘由形成:java

1,驱动配置有误:driver=com.mysql.jdbc.Driver
2,数据库链接地址有误:url=jdbc:mysql://localhost:3306/test?3useUnicode=true&characterEncoding=utf8
3,密码或账号有误:username=root
      password=root
mysql

4,数据库未启动或无权访问sql

5,项目未引入对应的驱动jar包mysql-connector-java-5.1.6-bin.jar数据库

6,mysql root没有远程访问的权限,须要增长权限,增长权限的步骤以下:
进入mysql数据库:
grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option;
flush privileges;ide

相关文章
相关标签/搜索