Hibernate连接MySQL数据库出现org.hibernate.exception.GenericJDBCException: Cannot open connection异

来源:百度知道 编辑:UC知道 时间:2024/07/04 05:58:21
Hibernate属性文件配置如下:
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/hibernate_first</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">888888</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
MySQL密码为888888
我感觉没错误啊 !!!

百度hi我。

1、数据库有没有开?自己试试url的地址能不能能不能连接上
2、驱动程序你有没有放和hibernate的包你放完进去没有?

1 数据库是否在服务里打开?
2 数据库的端口是否改动过?

你数据库开了没有啊?