当前位置:网站首页>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 命令了。
边栏推荐
- 数学建模——仓内拣货优化问题
- Minimalist thrift+consumer
- leetcode/和为k的连续子数组个数
- MySQL high performance optimization notes (including 578 pages of notes PDF document), collected
- 抓包工具Charles使用
- (CVPR-2019)选择性的内核网络
- Comprehensive explanation of "search engine crawl"
- (cvpr-2019) selective kernel network
- [MySQL] SQL aliases the table
- [the road of Exile - Chapter III]
猜你喜欢
Mathematical modeling -- cold proof simulation of low temperature protective clothing with phase change materials
What is browser fingerprint recognition
数据平台数据接入实践
Overview of Qualcomm 5g intelligent platform
数学建模——带相变材料的低温防护服御寒仿真模拟
5g commercial third year: driverless "going up the mountain" and "going to the sea"
Planning mathematics final exam simulation II
Use POI to export excel file, image URL to export file, image and excel file to export compressed package
Covering access to 2w+ traffic monitoring equipment, EMQ creates a new engine for the digitalization of all elements of traffic in Shenzhen
Super scientific and technological data leakage prevention system, control illegal Internet behaviors, and ensure enterprise information security
随机推荐
JVM learning minutes
Data platform data access practice
Use of packet capturing tool Charles
[observation] ranked first in SaaS of pure public cloud in three years, and yonsuite's "flywheel effect"
Super scientific and technological data leakage prevention system, control illegal Internet behaviors, and ensure enterprise information security
为什么 BI 软件都搞不定关联分析
DSP vibration seat
Web crawler API Quick Start Guide
知道创宇上榜CCSIP 2022全景图多个领域
The basic concept of transaction and the implementation principle of MySQL transaction
(arxiv-2018) 重新审视基于视频的 Person ReID 的时间建模
E-commerce keyword research helps data collection
Semiconductor chip industry chain
Promise solves asynchrony
Day01作业
How to deal with the DDoS attack on the game server and how to defend it?
Stonedb invites you to participate in the open source community monthly meeting!
【流放之路-第八章】
Thirty years of MPEG audio coding
The solution of reducing the sharpness of pictures after inserting into word documents