Steps:

1. In the option bar of IDEA, find View

2. Select Tool Windows from the drop-down list box

3. Locate the Database in the list that appears in the right triangle of Tool Windows

As shown in the figure:

After the preceding steps are complete, the following screen is displayed

4. Select the + sign under Database

5. Select Data Source

6. Select MySQL

As shown in the figure:

After the preceding steps are complete, the following screen is displayed

Interface on

7. Connection test

Of course, when entering this page for the first time, the Test Connection button is gray, because there is no responsive driver file, then you need to download the driver file, as shown in the figure

When the test is complete, click OK and you’re done

However, when you enter the connection, you find that there is not only one library? In the interface explanation, there is a Database that is not explained, now let’s talk about it

In the display, we do not set the library to display, so the default is the first one, here we need to operate, if only to display the required libraries, you can select, you can also select all

I habitually choose only what I use

Click OK when the selection is complete

7, How to execute SQL statement

Write SQL statements and execute SQL

8. Delete database links in IntelliJ IDEA

The author: Soul Hao Xuan welcome to pay attention to the public number

I reserve all rights and interests, reproduced please indicate the source. Welcome to have a story, have ideas to share with me, can be sent to E-mail: [email protected]