Get the App
SLTechnology News&Howtos  ›  Database  › 

Detailed description of the steps for installing MySQL in cluster rpm

Shulou Source: shulou.com Published: 2022-06-01 03:56:30 09月12日 Update

Install the mysql database

A) download the mysql source installation package: wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm

B) install MySQL source: yum localinstall mysql57-community-release-el7-8.noarch.rpm

If completeness appears at the end, the installation of the MySQL source is complete

C) check whether the installation is complete: yum repolist enabled | grep "mysql.*-community.*"

D) install mysql:yum install mysql-community-server

If complete appears at the end, the MySQL installation is complete.

E) set to enable and start mysql service: systemctl enable mysqld

F) check the installed mysql version: rpm-aq | grep-I mysql

G) start the MySQL service: systemctl restart mysqld

H) View MySQL initial password: grep'a temporary password' / var/log/mysqld.log

I) change the MySQL password: mysqladmin-u root-p 'old password' password 'new password'

There is a problem with changing the password here, and the change fails because the password is too simple. There are two alternative solutions:

Method 1: set the password to be more complex (this is the most direct way)

Method 2: turn off mysql password strength authentication (validate_password)

Edit the configuration file: vim / etc/my.cnf, add the line validate_password=off

Restart the mysql service after editing: systemctl restart mysqld

If you change the database port

Vim / etc/my.cnf add line prot=3306

Restart the mysql service after editing: systemctl restart mysqld

J) set mysql to be accessible remotely:

Log in to the MySQL:mysql-uroot-p password

Add a user to give access: grant all privileges on permission group. Permission to 'root'@'ip address' identified by 'password' with grant option; / / change ip to%%, indicating that all

Refresh permissions: flush privileges; ­

These are all the relevant knowledge points of this introduction. Thank you for your study and support.

Tags: Password method permission service data database this is complex two reasons address that is strength file version user knowledge knowledge point port problem Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Microsoft Linux Shulou Tech Info Huawei