0

我正在 Linux VPS 上设置我的 Spring MVC 项目。我的项目在我的家用 PC 上运行良好,但在 VPS 上它无法连接到数据库。这是我在项目中的数据源配置文件:

# DataSource 
ds.database-driver=com.mysql.jdbc.Driver
ds.url=jdbc:mysql://localhost:3306/myData?useUnicode=yes&characterEncoding=UTF-8
ds.username=root
ds.password=password

一切都与 VPS 上的 MySQL 信息相同。我只部署了war文件并运行,没有做任何其他事情。

4

0 回答 0