当前位置:网站首页>IDEA 连接 数据库
IDEA 连接 数据库
2022-07-29 01:16:00 【xiaoweiwei99】
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 命令了。

边栏推荐
- 数学建模——派出所选址
- Lm13 morphological quantification momentum period analysis
- leetcode/乘积小于K 的连续子数组的个数
- 分布式开发漫谈
- Number of consecutive subarrays with leetcode/ and K
- Monadic linear function perceptron: Rosenblatt perceptron
- 规划数学期末模拟考试一
- (arxiv-2018) 重新审视基于视频的 Person ReID 的时间建模
- Thirty years of MPEG audio coding
- 【流放之路-第五章】
猜你喜欢

TDA75610-I2C-模拟功放I2C地址的确定
![[WesternCTF2018]shrine](/img/c1/c099f8930902197590052630281258.png)
[WesternCTF2018]shrine
![[golang] network connection net.dial](/img/8d/7ef64cb63cbd230e5ac1655b86786f.png)
[golang] network connection net.dial

Thirty years of MPEG audio coding

Sigma-DSP-OUTPUT

FPGA实现10M多功能信号发生器

ASCII code table

StoneDB 邀请您参与开源社区月会!

As long as I run fast enough, it won't catch me. How does a high school student achieve a 70% salary increase under the epidemic?

Large scale web crawling of e-commerce websites (Ultimate Guide)
随机推荐
Have you ever encountered the situation that the IP is blocked when crawling web pages?
Regular filtering data learning notes (①)
Solution of Lenovo notebook camera unable to open
How to protect WordPress website from network attack? It is essential to take safety measures
Some summaries of ibatis script and provider
What are the common cyber threats faced by manufacturers and how do they protect themselves
druid. The performance of IO + tranquility real-time tasks is summarized with the help of 2020 double 11
Code reading - ten C open source projects
【云原生与5G】微服务加持5G核心网
StoneDB 邀请您参与开源社区月会!
Leetcode/0 and 1 consecutive subarrays with the same number
数学建模——派出所选址
Golang run times undefined error [resolved]
How companies make business decisions -- with the help of data-driven marketing
Lm13 morphological quantification momentum period analysis
[the road of Exile - Chapter 5]
MPEG音频编码三十年
规划数学期末模拟考试一
数学建模——仓内拣货优化问题
Where will Jinan win in hosting the first computing power conference?