How Can I Install the MySQL Client?

MySQL provides client installation packages for different OSs on its official website. Click here to download the MySQL 8.0 client installation package or click here to download the 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 in the following.

    **Figure 1** Download

    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