In the previous chapter, I used Github to build my personal website for free, but did not connect to the database. In this chapter, I will use my laptop as a server to build a project website that can connect to the database, but the database is not configured in the Linux system, and the cloud database is used. If you have the idea to give your own full configuration on Linux to connect (chapters 8 to 10) : blog.csdn.net/java_wxid/a…

First of all, I set up the background website for their own testing, so the cost is not much

Cost:

6 yuan a peanut shell Intranet penetration, Tencent cloud database 0.14 yuan/hour/set, my own laptop (Huawei MogioBook), personal labor cost of two hours.

Ok, process begins:

First register a Tencent cloud account (this process does not need me to write it) find the cloud database MySQL.

MySQL instance list

Click “Buy now”. The specific configuration is shown in the figure below. Since the amount of data in my database is small, the configuration is as follows

Click Buy Now

Click to go to the admin page

Wait about two minutes

Hit Initialize

Character set: UTf8, root account password to remember, background change project configuration required

Wait about two minutes

Click cDB-4wsDFgbr to enter the following page

Extranet address Click Open to copy extranet address. Use Navicat for MySQL client or SQL Yog client to connect to the cloud database

The account is root, and the password is the one you added when initializing. Paste the IP address and port number of the extranet

Creating a database

Import SQL statements to build tables

Click Login on the instance list page

Click login to the following page

The account is root, and the password is the one you added when you initialized it yourself

See if the data you just added is in the cloud database

Go to the configuration of the project to modify the URL, user name, password to cloud database

Install Maven, and export any projects that are not managed by Maven directly as war

If you see the war package under Target, find it

Open SecureFX to connect to Linux, go to the Webapps under Tomacat and upload the comment.war you just posted here

Select binary

Start SecureCRTPortable. In root, go to the bin directory of tomcat to start tomcat./startup.sh

Go to the Tomcat webapps

Open the application in Linux to enter the path for project access

Open the project path through IP in the go Windows browser

 

To buy a peanut shell Intranet penetration of 6 yuan, I have bought here will not say the process

The choice is still red. Turn him green

Direct extranet access

Simple login. If the login succeeds, the cloud database is connected

After testing my project, I do not want the cloud database to deduct my money, although it is only a few cents an hour, but I do not want to do data backup, click more destroy OK, but the next test will have to reconfigure the cloud database

In general, spend minimal money and play with your own project site