IDEA built-in database database management tool combat

Article Directory

①. Configure connection

  • ①. First open the IDEA page, we first add database
Insert picture description here

②. After adding, we can open it here

Insert picture description here

③. Add MySQL database

Insert picture description here

④. After opening, fill in the information by yourself (in the test, there may be an invalid time zone problem, continue to see the detailed solution)
after clicking OK, the corresponding driver will be downloaded, just wait!

Insert picture description here

⑤. Note: If the following error occurs when testing the connection

Insert picture description here
The above error solution appears
(1). Reason: The server returns an invalid time zone, go to the "Advanced" tab and manually set the "serverTimezone" attribute
(2). Solution: Log in to mysql, and enter the following command in the command line window:
show variables like'%time_zone%';
set global time_zone='+8:00';
After solving, test the connection to solve
Insert picture description here

⑥. Choose your own database

Insert picture description here

⑦. View the table structure in the database

Insert picture description here

⑧. View the SQL statement of the table

Insert picture description here

⑨. New query, query SQL statement

Insert picture description here

⑩. How to modify the table

Insert picture description here

②. Table operation

①. Create a table

Insert picture description here
Insert picture description here

②. Modify the table
Note: The operation of modifying the table is basically similar to the way of creating the table, except that you can also modify the table name information

Insert picture description here


Insert picture description here

③. View data and update

Insert picture description here

④. Here are some notes about using this tool:
IDEA tool needs to be the flagship IntelliJ IDEA Ultimate, the community version does not support the
first configuration of a specific database (such as: MySQL) connection, you need to download the JDBC driver, IDEA will automatically download (Need to connect to the Internet); Of course, you can also customize the JDBC driver and set it in the configuration connection interface:

Insert picture description here