Detailed steps for installing MySQL using cluster rpm

Detailed steps for installing MySQL using cluster rpm

Install 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 complete! appears at the end, it means that the MySQL source installation 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 start the 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 the initial MySQL password: grep 'A temporary password' /var/log/mysqld.log

i) Change 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 solutions:

Method 1: Make your password more complex (this is the most direct method)

Method 2: Turn off MySQL password strength verification (validate_password)

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

After editing, restart the mysql service: systemctl restart mysqld

If you change the database port

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

After editing, restart the mysql service: systemctl restart mysqld

j) Set up mysql to be accessible remotely:

Log in to MySQL: mysql -uroot -p password

Add a user to grant access rights: grant all privileges on permission group. Permission to 'root'@'ip address' identified by 'password' with grant option; //You can change the ip to %%, which means to enable all

Refresh privileges: flush privileges;

The above are all the relevant knowledge points introduced this time. Thank you for your learning and support for 123WORDPRESS.COM.

You may also be interested in:
  • MySQL high availability cluster deployment and failover implementation
  • Detailed explanation of MySQL cluster: one master and multiple slaves architecture implementation
  • Detailed explanation of MySQL cluster construction
  • Build a high-availability MySQL cluster with dual VIP

<<:  Nginx prohibits direct access via IP and redirects to a custom 500 page

>>:  Solve the problem of using swiper plug-in in vue

Recommend

64-bit CentOs7 source code installation mysql-5.6.35 process sharing

First install the dependent packages to avoid pro...

Solution to occasional crash of positioning background service on Linux

Problem Description In the recent background serv...

How to use ElementUI pagination component Pagination in Vue

The use of ElementUI paging component Pagination ...

Detailed explanation of web page loading progress bar (recommended)

(When a web page is loading, sometimes there is t...

Example code for converting http to https using nginx

I am writing a small program recently. Because th...

Will the deprecated Docker be replaced by Podman?

The Kubernetes team recently announced that it wi...

Tomcat parses XML and creates objects through reflection

The following example code introduces the princip...

vue-table implements adding and deleting

This article example shares the specific code for...

JavaScript counts the number of times a character appears

This article example shares the specific code of ...

JavaScript array merging case study

Method 1: var a = [1,2,3]; var b=[4,5] a = a.conc...

Install MySQL 5.7.18 using rpm package under CentOS 7

I have been using MySQL recently. The article mys...

Vue achieves seamless carousel effect (marquee)

This article example shares the specific code of ...