Get the App
SLTechnology News&Howtos  ›  Database  › 

Explain in detail how to install mysql on Ali Cloud

Shulou Source: shulou.com Published: 2022-06-01 04:32:38 09月29日 Update

As a lightweight open source database, mysql is widely used in enterprise applications. I've used mssql,oracle,postgresql,mysql before. Currently, there is no oracle on Aliyun. In terms of my personal use, I would prefer mysql to create a project.

Uninstall an existing mysql

The mysql database may already exist in the system, so we need to uninstall it before installing it.

# rpm-qa | grep-I mysql

This command will show the installed mysql software, and then uninstall the software one by one with the following command. Note: this uninstall is not complete, but there is enough here.

# yum remove 'Software name'

Today, I will briefly introduce the steps to install mysql on Ali Cloud. My personal operating system is CentOs of Aliyun ecs. First, download and install mysql-server from the official website:

Wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpmrpm-ivh mysql-community-release-el7-5.noarch.rpmyum install mysql-community-server

After the installation is successful, restart mysql:

Service mysqld restart

There is no password for the initial installation. We need to set the password for root. First, switch to the mysql command:

Mysql-u root

Set the password:

Mysql > set password for 'root'@'localhost' = password (' password')

Remote connection settings, by default, do not allow all ip to allow remote connections:

Mysql > grant all privileges on *. * to root@'%'identified by 'password'

The latest rules for inbound network direction in Ali Cloud no longer need to be set, and mysql is allowed to default to port 3306.

The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.

Tags: Ali commands passwords software personal data database system success operating system enterprise content enough that is situation direction steps ports rules lightweight Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Huawei Microsoft Shulou Tech Info MariaDB