当前位置:网站首页>IDEA 连接 数据库
IDEA 连接 数据库
2022-07-28 22:23:00 【web18484626332】
IDEA 连接 数据库
一、首先确保数据库服务是打开的

- 使用 mysql -u root -p 连接数据库服务器。
- 若不能进入到 mysql 里面则说明 没有启动服务器,使用 net start mysql 命令启动。
- 如果 net start mysql 也无法启动,就需要 安置 MySQL:
- 以管理员身份运行 cmd,转到 mysql 的 bin 目录下,使用命令: mysqld -install 安置 MySQL,然后再次连接数据库。
- 直到出现 mysql> 标志,才说明成功打开服务器。
二、在 idea 中 连接 mysql
1、找到 idea 中 MySQL 数据库的连接方式。
第一步,找到 Database
第二步,点击"+"
第三步,点击 Data Source
第四步,点击 MySQL
2、配置连接。
在 第一次使用 的时候,除了要配置连接,还要配置相应的驱动,否则连接的时候会报错!!!
图中的①②③④⑤分别表示为:
①、连接的名称
②、连接的数据库地址和端口号(连接本地的数据库就默认为localhost,端口号为3306)
③、MySQL数据库的用户名和密码
④、需要连接的数据库名称
⑤、配置完成之后,点击测试连接,查看是否连接成功。
配置驱动:
回到 Date Sources,出现绿色的小勾,即表示连接成功,然后点击OK,结束配置。
最后点击Database,即可出现刚刚新建的连接。
接下里就可以去编写 mysql 命令了。

边栏推荐
- [microservice] Nacos cluster building and loading file configuration
- Sword finger offer 55 - I. depth of binary tree
- 【C】 Replace spaces and realize binary parity bit exchange of integers by macros
- Principle of meter skipping
- CMake 基础学习
- Compilation principle research study topic 2 -- recursive descent syntax analysis design principle and Implementation
- ZABBIX 5.0 uses its own redis template for monitoring
- 【微服务】Nacos集群搭建以及加载文件配置
- Samsung asset management (Hong Kong) launched yuancosmos ETF to focus on investing in the future tuyere track
- Have passed hcip and joined the company of your choice, and share the learning experience and experience of Huawei certification
猜你喜欢

Google browser, no installation required

Attack and defense world web master advanced area web_ php_ unserialize

Es6操作教程

#{}和${}的区别

Leetcode61. rotating linked list

研发效能的道法术器

Geth installation

Introduction and solution of common security vulnerabilities in web system CSRF attack

IDEA报错Error running ‘Application‘ Command line is too long解决方案

Centos7 install mysql8
随机推荐
Idea2021.2 installation and configuration (continuous update)
Kali installs burpsuite professional
mysql中exists的用法详解
【MySQL系列】MySQL数据库基础
Applet editor rich text editing and rich text parsing
研发效能的道法术器
[TA frost wolf _may- "hundred people plan"] art 2.2 model basis
Add build dependency error
With this, your messages can't be monitored
【微服务】Nacos集群搭建以及加载文件配置
基于 FPGA 实现数字时钟详细原理讲解及验证结果
ACM SIGIR 2022 | interpretation of selected papers of meituan technical team
@Transactional 注解使用详解
Interpretation of ISO 13400 (doip) standard
Feign call fails. JSON parse error illegal character ((ctrl-char, code 31)) only regular white space (R
Compilation principle research study topic 2 -- recursive descent syntax analysis design principle and Implementation
Real time data warehouse: Netease strictly selects the practice of real-time data warehouse based on Flink
Oracle超全SQL,细节狂魔
Leetcode63. Different paths II
Data warehouse: Doris' application practice in meituan