Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to connect to a database through DBeaver/RazorSQL/DbVisualizer tools

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

How to connect to the database through DBeaver/RazorSQL/DbVisualizer tools, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.

1. Seamless interaction between DBeaver and GaussDB T database

DBeaver is a general SQL client and database management tool. For relational databases, it uses JDBC API to interact with the database through the JDBC driver. Dbeaver provides an editor that supports code completion and syntax highlighting, while providing a plug-in architecture that allows users to modify most of the behavior of the application to provide database-specific functionality or features independent of the database.

The community version of DBeaver is extremely rich and powerful.

After installing DBeaver, create a new driver through "Driver Manager", and add the GaussDB driver from the media provided by GaussDB T on the following page. After decompression, you can find the JDBC driver jar file:

After adding the driver file, "Find Class", after selecting ZenithDriver in the drop-down, the "Class Name" location will automatically fill in the driver name of GaussDB.

Next, fill in your database address and port information in the URL Template location (provided that the server has remote access permission turned on), save it, and everything is ready.

My system encountered the following error while establishing a connection:

[errorCode=GS-00503, SQLState='08006', reason='Get connection failed., detail: java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter', clientIP=19.18.1.7.]

^ [A ^ C

SQL > create user steven identified by modb1234

GS-00657, Password is too simple, password should contain at least three of the following character types:

A. At least one lowercase letter

B. At least one uppercase letter

C. At least one digit

D. at least one special character: `~! @ # $% ^ & * ()-_ = +\ | [{}]:'", /? and space

SQL >

SQL > ^ [[A ^ C]

SQL > create user steven identified by modb123 $

Succeed.

SQL > grant connect,resource to steven

Succeed.

5. Reload the hba IP whitelist configuration file

SQL > alter system reload hba config

Succeed.

6. Use the RazorSQL tool to connect gaussdb

DATABASE TYPE Select OTHER

Input in turn

Connection name: gauss

Login user and password: steven/modb123 $

Jdbc driver class name: com.huawei.gauss.jdbc.ZenithDriver

Drive file path: / gaussdb/GaussDB_100_1.0.1-REDHAT7.5-X86/GaussDB_100_1.0.1-CLIENT-JDBC/com.huawei.gauss.jdbc.ZenithDriver-GaussDB_100_1.0.1.SPC2.B003.jar

JDBC URL:jdbc:zenith:@192.168.56.102:1888

As follows:

7. Use the RazorSQL tool to test SQL

Create table steven_test (id number,class_name varchar2 (30), name varchar2 (50))

Insert into STEVEN.STEVEN_TEST values (1, recollection, 222, memorialization)

Select * from STEVEN.STEVEN_TEST

Use RazorSQL to draw a Christmas tree

Draw a Christmas tree with Lao Yang's SQL:

Third, use DbVisualizer graphical tool to connect GaussDB T database under MAC.

The following describes how to use the DbVisualizer graphical tool to connect to Gauss 100 GaussDB T database under MAC OS to solve the Get connection failed., detail: java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter problem.

After using it, I found that the interface of RazorSQL is not very friendly. Later, I found DbVisualizer. The interface and function are better than RazorSQL.

1. Download and install DbVisualizer

Download address:

Https://www.dbvis.com/download/10.0

2. Give users the right to view all tables

SQL > grant select any table to steven

Succeed.

3. Load gaussdb driver in DbVisualizer

Tools > Driver Manager...

Click the plus sign in the upper right corner, create a new driver

Click on the folder of driver jar files to select the jdbc driver for gaussdb 100.

Name:gaussdb

URL:jdbc:zenith:@:

Driver Class: select com.huawei.gauss.jdbc.ZenithDriver

The screenshot is as follows:

4. create a new database connection

Database type Select Generic

Driver Select gaussdb

URL:jdbc:zenith:@192.168.56.102:1888

Login user and password: steven/modb123 $

Click on the link to report an error:

Get connection failed., detail: java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter

Because the java version is too new, download jaxb-api-2.3.0.jar to join the java path solution

Http://search.maven.org/remotecontent?filepath=javax/xml/bind/jaxb-api/2.3.0/jaxb-api-2.3.0.jar

Download it and put it in one of the java class path.

Help-> about can see:

/ Applications/DbVisualizer.app/Contents/java/app/lib

5. Connect to the database to view the data

6. Run SQL

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report