How to connect the local Springboot project to the Aliyun server MySql database?
1. Security group release
First of all, we need to do the server security group release (the port corresponding to the database on the Alibaba Cloud server and the pagoda panel). If you don’t know how to do it, you can read an article I wrote before.
Alibaba Cloud ECS server database creation and connection (pagoda connection)
2. Test connection
We can use IDEA's DataBase database connection tool or Sqlyog, Navicat and other tools to try to connect
2-1 Connect using Sqlyog
2-2 Connect using IDEA's DataBase tool
3. Configure the database connection in the project
Configure the database connection in the project configuration file
4. Test whether the project is actually connected to the server database successfully
Simply write a Controller class in the project to return some simple data
and test it in Postman