DataGrip installation and connection to MySQL database

DataGrip installation and connection to MySQL database

Jetbrains is a well-known commercial software provider of programming tools, with a lot of software under its banner. Including IDE, team development tools, plug-ins and Microsoft .Net auxiliary tools, including self-created language Kotlin, etc. The family bucket we usually use and say mainly refers to its IDE suite. Jetbrains' IDE tools all support cross-platform, and there are Windows, Linux and MacOS versions.

DataGrip is a cross-platform database tool available on Windows, OS X and Linux. It also supports multiple databases, including SQL Server, Oracle, PostgreSQL, MySQL, DB2, Sybase, SQLite, Derby, HyperSQL, and H2.

DataGrip is a database management client tool, which is convenient to connect to the database server, execute sql, create tables, create indexes, and export data, etc. This graphical interface tool has more powerful functions and more friendly interface prompts.

I believe that when you see DataGrip for the first time, you will have an amazing feeling, just like when you see a girl for the first time, you just glance at it, and you say to yourself, it is her! Without further ado, let's take a look at the common functions of DataGrip.

1. DataGrip installation

Software official website download: https://www.jetbrains.com/products/

You can also download a newer version, the installation process is the same!

insert image description here

1. Download the installation package from the official website, double-click .exethe file to start the installation:

insert image description here

2. Click next to complete the installation step by step

insert image description here

3. Select the installation directory of DataGrip, and then select Next

insert image description here
insert image description here

Next, perform the installation

insert image description here
insert image description here

2. Connect to the MySQL database

1. Use DataGrip to connect to the MySQL database:

insert image description here

2. After the driver download is complete, click Test Connection:

insert image description here

jarAfter the configuration and driver packages are downloaded, you can click " Test Connection" to test whether you can connect to
MySQL. If " Successed" appears, the table name connection is successful.

3. Display all databases:

After connecting to the MySQL service, all databases are not displayed. At this time, we need to set and display all databases. The specific operations are as follows:

insert image description here

4. Create a database

insert image description here

5. Enter the database name

insert image description here

Note :
The database can be created in the following two ways:

  • A. create database db01 ;
  • B. create schema db01 ;

6. Create a table

Right click on the specified database and select new-->Table

insert image description here

Enter the corresponding information:

insert image description here

created successfully

insert image description here

7. Modify the table structure

On the table to be modified, right click and select " Modify Table..."

insert image description here
insert image description here

  • If you want to add a field, just click +the number, enter the field information, and then click 执行(Execute).
  • If you want to delete a field, click directly -to delete the field, and then click 执行(Execute).
  • If you want to modify the field, 双击the corresponding field, modify the field information, and then click 执行(Execute).
  • If you want to modify the table name or the comment of the table, directly modify it in the input box, and then click 执行(Execute).

8. Execute SQL statements in DataGrip

On the specified database, 右键, select New-->Query Console

insert image description here

Then you can open it Query Console控制台, write SQL in the console, and execute SQL.

insert image description here

Select to execute:

insert image description here

Note: It is for learning reference only, if there are any deficiencies, please correct me! ! !

Guess you like

Origin blog.csdn.net/weixin_43412762/article/details/132263164