当前位置:网站首页>How to operate redis on the IntelliJ idea database console
How to operate redis on the IntelliJ idea database console
2022-06-22 21:28:00 【Flybook Technology】
TIPS
- This theory supports IntelliJ IDEA Family owned IDE( for example Data Grip etc. )、 All versions
- The theory supports all based on JDBC Various GUI Tools !
Recently at work , Always operate to Redis, Despite the market Redis client GUI A lot , for example Redis Desktop Manager、AnotherRedisDesktopManager etc. .
But I am a IDEA flow , I hope I can IDEA Operate on the console Redis, So as to obtain a consistent R & D experience , You don't have to cut around the windows .
therefore , I try to find out if there is a suitable Redis plug-in unit , The result is either a charge , Or the experience is poor ; next , I also want to know about the official response to Redis Support intention , After seeing the following post , The heart is also cold .
- Redis support : For the most part , Officials say the plan is to IDEA 2022 Version supports , However ,IDEA 2022 When it will be released is unknown .
here , It occurred to me that ,IDEA The database console allows you to use JDBC Drive to connect to any database , Then all I have to do is Redis To write JDBC drive , You can achieve your goal !
Redis JDBC
Do as you say , It took a day and a half , Wrote a Redis JDBC drive , Address :GitHub - eacdy/redis-jdbc , This is a base Jedis Of Redis JDBC drive , Allow us to use JDBC operation Redis And Redis Cluster, Support Jedis All commands supported .
Let's discuss how to IDEA use Redis JDBC link Redis.
TIPS
Here we use Redis JDBC 0.0.1 For example , When a new version is released in the future , Just change the version number in the connection .
Prepare the driver file
- Go to [repo1.maven.org/maven2/com/…] , Download the driver file
To configure IDEA Connect Redis
- Go to IDEA - Database - Click on the plus sign - Click on Driver and Data Source
- Click on User Driver - Click on Go to Driver, Here's the picture
- In the pop-up driver configuration page , Operate according to the following figure . among :
- Name: Is the driver name , Write casually , You can understand it yourself
- Click on the plus sign , Add the driver you just downloaded JAR Package file
- After adding JAR After package , Click on Class The drop-down menu on the right , You can see the driver class name . among ,RedisDriver Used to connect to the stand-alone version Redis,RedisClusterDriver Used to connect Redis Cluster
- Click... In the upper left corner of the figure above Data Sources, Continue configuring the data source , Operate according to the following figure . among :
- Name: The name of the data source , Write casually , You can understand it yourself
- URL: Connect Redis The address of . If a single machine is connected Redis, Please use
jdbc:redis://{hostname}:{port}/{dbIndex}In the form of ; If connected Redis Cluster, Please usejdbc:redis-cluster:///{hostname1}:{port1};{hostname2}:{port2};{hostname3}:{port3}In the form of , See redis-jdbc README . If you have an account number or password or something , Fill in as needed , I have no account number and password, so I left it blank
- Click on Test Connection, Test whether the configuration is normal . Click on Apply OK that will do .
Use
In turn, the operating :
- Click the data source just created
- Click on QL Button
- Click on New Query Console
- On the left side. Console Written in Redis Instructions , Currently all instructions are supported
- Click the execute button
such , You can see the results below !
Have a good time , Welcome to use 、Star、Follow、 Give me a request !
边栏推荐
猜你喜欢
随机推荐
Set up your own website (12)
RealNetworks vs. 微软:早期流媒体行业之争
300. 最长递增子序列 ●●
第019讲:函数:我的地盘听我的 | 课后测试题及答案
[redis]redis6 transaction operations
[142. circular linked list II]
Baijia forum Wu Zetian
csv新增一列
[513. find the value in the lower left corner of the tree]
Operation of simulation test platform for 2022 Shandong safety officer C certificate test
【142. 环形链表 II】
[redis]Redis6的主从复制
[cm11 linked list splitting]
第025讲:字典:当索引不好用时 | 课后测试题及答案
Install MySQL in ECS (version 2022)
Flutter System Architecture(Flutter系统架构图)
[redis] three new data types
第022讲:函数:递归是神马 | 课后测试题及答案
[redis]三种新数据类型
513. 找树左下角的值 / 剑指 Offer II 091. 粉刷房子

![[redis]配置文件](/img/1c/05c06d59c9efb5983f877822db333c.png)


![[redis] cluster and common errors](/img/a5/94906b62b1ec0d549f9b72ff3db7f2.png)




