Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does DataGrip connect to Mysql and create a database

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "DataGrip how to connect Mysql and create a database". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how DataGrip connects Mysql and creates a database".

First, DataGrip connection to the database? 1. Click File-> New-> data Source-> Mysql

The following picture will appear

Host: ip where the Mysql database is located. Example: 127.0.0.1

Port: Port to access Mysql example: 3306 (Mysql default port)

User: user who logs in to Mysql example: root

Password: password for logging in to Mysql example: ABCC password 123

When you are done, click apply.

two。 Open the console

Press Ctrl+Shift+F10 and select the console (default) to start our database usage.

Use our Sql syntax in this place for a simple and easy learning process

Second, create and manage database 1. Create a database

After logging in to the MySQL service, we can use the create command to create the database. The syntax is as follows:

CREATE DATABASE database name

For example, to create a study library is

CREATE DATABASE study

When you are done, you can see the study library in the left view

Of course, we can also right-click the data source and select New, and then select the schema to create a new database.

two。 Manage database

We can use USE to select the Mysql database to operate on, and after using this command, all Mysql commands are only for that database.

USE database name

For example, selecting the study library is

USE study

After we finish, we can see at the top right that we have selected the study library.

Of course, we can also choose to click the drop-down box to select the database we want to select directly.

3. Show database

We can use USE to select the Mysql database to operate on, and after using this command, all Mysql commands are only for that database.

SHOW DATABASES:

When you're done, you can see all our databases below.

Of course, this is exactly the same as the database under the data source on our left.

Thank you for your reading, the above is the content of "how to connect DataGrip to Mysql and create a database". After the study of this article, I believe you have a deeper understanding of how DataGrip connects to Mysql and create a database. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report