Detailed explanation of rpm installation in mysql

Detailed explanation of rpm installation in mysql

View installation and uninstallation

# View rpm -qa | grep mysql

# Uninstall yum -y remove mysql-libs-5.1.66-2.el6_3.x86_64

1. CentOS7 needs to uninstall mariadb first
View the command rpm -qa | grep mariadb

Installation package resource address

mysql download address: https://dev.mysql.com/downloads/mysql/

# Download resource namemysql-5.7.22-1.el7.x86_64.rpm-bundle.tar

Unzip resources

tar -xvf mysql-5.7.22-1.el7.x86_64.rpm-bundle.tar

Get the rpm package

mysql-community-common-5.7.19-1.el6.x86_64.rpm

mysql-community-client-5.7.19-1.el6.x86_64.rpm

mysql-community-server-5.7.19-1.el6.x86_64.rpm

mysql-community-libs-5.7.19-1.el6.x86_64.rpm

Install

# Installation order# common --> libs --> clients --> server

# Installation command rpm -ivh mysql-community-common-5.7.19-1.el6.x86_64.rpm mysql-community-libs-5.7.19-1.el6.x86_64.rpm mysql-community-client-5.7.19-1.el6.x86_64.rpm mysql-community-server-5.7.19-1.el6.x86_64.rpm

You may need to rely on the libaio package

Installation command yum -y install libaio

initialization

mysqld --initialize --user=mysql

start up

service mysqld start

Log in

# View the initial password cat /var/logs/mysql.log

 

#Or grep 'password' /var/logs/mysql.log -n -B 5

 

# Login to mysql -uroot -p'123456'

# Modify the initial password set PASSWORD=PASSWORD('password');

Authorize Remote Link

### Authorize 192.168.0.1 to remotely connect to *[all databases].*[all tables] Account: root Password: 123456

grant all privileges on *.* to 'root'@'192.168.0.1' identified by '123456';

 

### Authorize all IPs

grant all privileges on *.* to 'root'@'%' identified by '123456';

 

### Above *.* means [database].[table]

 

 

### Make the authorization take effect immediately flush privileges;

You may also be interested in:
  • MySQL database migration quickly exports and imports large amounts of data
  • Shell script to operate MySQL database to delete duplicate data
  • How to add, delete and modify columns in MySQL database
  • MySQL implements a solution similar to Oracle sequence
  • mysql code to implement sequence function
  • Can't connect to local MySQL through socket ''/tmp/mysql.sock'' solution
  • A complete list of commonly used MySQL functions (classified and summarized)
  • Use MySQL master-slave configuration to achieve read-write separation and reduce database pressure
  • mysql+spring+mybatis to realize code configuration of database read-write separation
  • The difference between char, varchar and text field types in MySQL

<<:  Detailed explanation of JavaScript state container Redux

>>:  How to add Nginx proxy configuration to allow only internal IP access

Recommend

MySQL trigger trigger add, delete, modify and query operation example

This article uses examples to describe the add, d...

Web Design Experience: Self-righteous Web Designers

1. Trash or Classic? Web technology updates very ...

Tutorial on how to use profile in MySQL

What is a profile? We can use it when we want to ...

React encapsulates the global bullet box method

This article example shares the specific code of ...

Tutorial on installing MySQL 8.0.11 using RPM on Linux (CentOS7)

Table of contents 1. Installation preparation 1. ...

How to implement element floating and clear floating with CSS

Basic Introduction to Floating In the standard do...

Common rule priority issues of Nginx location

Table of contents 1. Location / Matching 2. Locat...

Analysis of MySQL general query log and slow query log

The logs in MySQL include: error log, binary log,...

A brief discussion on several situations where MySQL returns Boolean types

mysql returns Boolean type In the first case, ret...

Vue two fields joint verification to achieve the password modification function

Table of contents 1. Introduction 2. Solution Imp...

Introduction to commonly used MySQL commands in Linux environment

Enter the mysql command: mysql -u+(user name) -p+...

How to manually upgrade the node version under CentOs

1. Find the corresponding nodejs package, refer t...

Why are the pictures on mobile web apps not clear and very blurry?

Why? The simplest way to put it is that pixels are...