当前位置:网站首页>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 命令了。
边栏推荐
- NPM replace the latest Taobao image
- MySQL安装配置教程(超级详细、保姆级)
- Doip communication of canoe application case
- Real time data warehouse: Didi's real-time data warehouse landing practice
- mysql中exists的用法详解
- Oracle create tablespaces and users
- Attack and defense world web master advanced area PHP_ rce
- Plato farm is expected to further expand its ecosystem through elephant swap
- Have passed hcip and joined the company of your choice, and share the learning experience and experience of Huawei certification
- Control fillet stroke materialshapedrawable
猜你喜欢
【微服务~Nacos】Nacos服务提供者和服务消费者
SQL implementation merges multiple rows of records into one row
"Method not allowed", 405 problem analysis and solution
[CNN] Why is the convolution kernel size of CNN usually odd
CV target detection model sketch (2)
Simple use and understanding of laravel message queue
IDEA2021.2安装与配置(持续更新)
Advanced area of attack and defense world web masters unserialize3
Doip communication of canoe application case
Install MySQL using Yum for Linux
随机推荐
Erc20 Standard Code
JS advanced ES6 ~ es13 new features
MySQL installation and configuration tutorial (super detailed, nanny level)
Sword finger offer 64. find 1+2+... +n, logical operator short circuit effect
Idea2021.2 installation and configuration (continuous update)
Web系统常见安全漏洞介绍及解决方案-CSRF攻击
“Method Not Allowed“,405问题分析及解决
Advanced area of attack and defense world web masters supersqli
Field injection is not recommended solution
动态规划问题(三)
Simple use and understanding of laravel message queue
【MySQL 8】Generated Invisible Primary Keys(GIPK)
With this, your messages can't be monitored
Data warehouse: Doris' application practice in meituan
Solution: direct local.Aar file dependencies are not supported when building an aar
"Method not allowed", 405 problem analysis and solution
Opencv macro definition
AutoCAD -- import excel tables into CAD and merge CAD
Cmake basic learning
Advanced area of attack and defense world web masters training www robots