ERROR [RMI TCP Connection(3)-127.0.0.1] - init datasource error

运行报错

ERROR [RMI TCP Connection(3)-127.0.0.1] - init datasource error, url: jdbc:mysql://localhost:3366/sm?useUnicode=true&characterEncoding=utf8
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

Last packet sent to the server was 0 ms ago.
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
	at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)

解决方法:把端口改一下,端口问题

jdbc:mysql://localhost:3306/sm?useUnicode=true&characterEncoding=utf8
posted @ 2020-07-21 10:02  ASini  阅读(1336)  评论(0编辑  收藏  举报