Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Show all

Help Center/ TaurusDB/ FAQs/ Client Installation/ How Can I Install the MySQL Client?

How Can I Install the MySQL Client?

Updated on 2024-12-30 GMT+08:00

MySQL provides client installation packages for different OSs on its official website. Download the MySQL 8.0 client installation package or packages of other versions. The following uses Red Hat Linux as an example to show how to obtain the required installation package and install it.

Procedure

  1. Obtain the installation package.

    Find the link to the required version on the download page. The mysql-community-client-8.0.21-1.el6.x86_64 is used as an example.

    Figure 1 Download
    NOTE:

    Click No thanks, just start my download. to download the installation package.

  2. Upload the installation package to the ECS.

    NOTE:

    When you create an ECS, select an OS, such as Red Hat 6.6, and bind an EIP to it. Then, upload the installation package to the ECS using a remote connection tool, and use PuTTY to connect to the ECS.

  3. Run the following command to install the MySQL client:

    sudo rpm -ivh mysql-community-client-8.0.21-1.el6.x86_64.rpm
    NOTE:
    • If any conflicts occur during the installation, add the replacefiles parameter to the command and try to install the client again. Example:
      rpm -ivh --replacefiles mysql-community-client-8.0.21-1.el6.x86_64.rpm
    • If a message is displayed prompting you to install a dependency package, you can add the nodeps parameter to the command and install the client again. Example:
      rpm -ivh --nodeps mysql-community-client-8.0.21-1.el6.x86_64.rpm

  4. Use the MySQL client to connect to the database and check whether the client can run properly.

    mysql -h <hostIP> -P <port> -u <userName> -p --ssl-ca=<cafile>

    Table 1 Parameter description

    Parameter

    Description

    <hostIP>

    Private IP address.

    To obtain this parameter, go to the Basic Information page of the instance and view the private IP address in the Network Information area.

    <port>

    Database port. By default, the value is 3306.

    To obtain this parameter, go to the Basic Information page of the instance and view the database port in the Network Information area.

    <userName>

    Username, that is, the TaurusDB database administrator account. The default value is root.

    <cafile>

    SSL certificate file, which should be stored in the same directory where the command is executed.

    Example:

    To connect to a DB instance through an SSL connection as user root, run the following command:

    mysql -h 172.xx.xx.xx -P 3306 -u root -p --ssl-ca=ca.pem

    Enter the password of the database account as prompted.

    Enter password:
    NOTE:

    If error information similar to "mysql: error while loading shared libraries: libxxxx: cannot open shared object file: No such file or directory" is displayed, perform the following steps:

    For example, if the error "mysql: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory" is displayed:

    1. Query the current version file of the dynamic library that reports the error on the local host.

      find / -name libtinfo.so*

      Assume that the query result is as follows:

      /usr/lib64/libtinfo.so.6.2

      /usr/lib64/libtinfo.so.6

    2. Set up the soft link of the required version.

      ln -s /usr/lib64/libtinfo.so.6 /usr/lib64/libtinfo.so.5

    3. Connect to the database again.

      mysql -h <hostIP> -P <port> -u <userName> -p --ssl-ca=<cafile>

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback