Updated on 2024-11-29 GMT+08:00

Installing a MySQL Client

Doris supports the MySQL protocol. Therefore, most clients (including the CLI or IDE) that support the MySQL protocol can access Doris, for example, MariaDB, DBeaver, and Navicat for MySQL.

This section uses the MySQL 8.0.22 client of Red Hat as an example.

Prerequisite

The node where you want to install the MySQL client can communicate with the MRS cluster.

Procedure

  1. Log in to the node where you want to install the MySQL client as the root user.
  2. Run the following command to check the version of the ncurses-libs library on which the MySQL client depends:

    rpm -qa | grep ncurses

  3. Download the software package of the MySQL client from https://downloads.mysql.com/archives/community/. You are advised to install MySQL 8.x. The following uses Red Hat as an example:

    • If the dependent library in 2 is 6.x, you are advised to download the MySQL software package whose OS version is Red Hat 8.
    • If the dependent library in 2 is 5.x, you are advised to download the MySQL software package whose OS version is Red Hat 7.

    For example, to install the MySQL 8.0.22 client of Red Hat, download the following software packages:

  4. Upload the downloaded software packages to the node where you want to install the MySQL client.
  5. Run the following commands in the directory where the uploaded files are stored to install the MySQL client and the corresponding dependency packages:

    rpm -ivh mysql-community-client-8.0.22-1.el7.x86_64.rpm --nodeps --force

    rpm -ivh mysql-community-client-plugins-8.0.22-1.el7.x86_64.rpm --nodeps --force

    rpm -ivh mysql-community-common-8.0.22-1.el7.x86_64.rpm --nodeps --force

    rpm -ivh mysql-community-libs-8.0.22-1.el7.x86_64.rpm --nodeps --force

  6. Run the following command to check the MySQL client version:

    mysql --version

  7. After the MySQL client is successfully installed, you can access Doris. For details, see Using Doris from Scratch.