Giter Site home page Giter Site logo

无法连接服务器 about efo HOT 14 CLOSED

code4everything avatar code4everything commented on July 28, 2024
无法连接服务器

from efo.

Comments (14)

ZainZhao avatar ZainZhao commented on July 28, 2024

登录的时候也是一卡住,我修改了两个配置的数据库url,请问除了这个还要修改什么吗

from efo.

easepan avatar easepan commented on July 28, 2024

数据库连接失败了吧,控制台有异常抛出吗

from efo.

ZainZhao avatar ZainZhao commented on July 28, 2024

Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.

from efo.

ZainZhao avatar ZainZhao commented on July 28, 2024

我换了一下驱动也没用

from efo.

ZainZhao avatar ZainZhao commented on July 28, 2024

对了,我在导入sql的时候,只导入了efo.sql,在执行最后几行创建用户并授权的时候,报错了,我就没有执行,但是我在程序中改了连接的用户和密码,用root进行连接。除此之外,我的mysql是在虚拟机上的,但是我本地用navicat是可以直接连上的,防火墙应该没有问题

from efo.

ZainZhao avatar ZainZhao commented on July 28, 2024

我现在不太清楚您写的两个配置文件中都有数据库的连接,我两个都进行了修改,都把usermane和pwd换为了mysql的root

from efo.

easepan avatar easepan commented on July 28, 2024

sql 文件最后几行执行授权失败没啥关系的,改配置文件的用户名和密码就可以了,application.porperties通常是开发环境(默认),application-prod.properties 通常是生产环境,数据库能联通基本上也就没有啥问题了

from efo.

ZainZhao avatar ZainZhao commented on July 28, 2024

我是初学spring boost ,是不是项目部署和运行的时候有错误,我仅仅maven build ,然后修改数据库连接,就直接运行了main,除此就没有修改什么了

from efo.

ZainZhao avatar ZainZhao commented on July 28, 2024

有一条日志
Loading class com.mysql.jdbc.Driver'. This is deprecated. The new driver class is com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.

from efo.

ZainZhao avatar ZainZhao commented on July 28, 2024

这个日志可能是我提高了jdbc的版本

from efo.

easepan avatar easepan commented on July 28, 2024

这个我也不太清楚了,你的mysql不是5.7吧,只有多查资料了

from efo.

ZainZhao avatar ZainZhao commented on July 28, 2024

好的,谢谢

from efo.

ZainZhao avatar ZainZhao commented on July 28, 2024

再次麻烦一下,请问数据库连接的useSLL能不能变为false

from efo.

easepan avatar easepan commented on July 28, 2024

可以的,连接条件都是可以修改的,只是有些情况可能会报警告

from efo.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.