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

How to create LVM for XFS file system in Ubuntu

Preface lvm (Logical Volume Manager) logical volu...

CSS to achieve particle dynamic button effect

Original link https://github.com/XboxYan/no… A bu...

MySQL json format data query operation

The default table name is base_data and the json ...

Vue implements the magnifying glass function of the product details page

This article shares the specific code of Vue to i...

Detailed tutorial of using stimulsoft.reports.js with vue-cli

vue-cli uses stimulsoft.reports.js (nanny-level t...

Responsive layout summary (recommended)

Basic knowledge of responsive layout development ...

Install mysql5.7.17 using RPM under Linux

The installation method of MySQL5.7 rpm under Lin...

How to implement Mysql scheduled tasks under Linux

Assumption: The stored procedure is executed ever...

A quick guide to MySQL indexes

The establishment of MySQL index is very importan...

Detailed explanation of moment.js time and date processing

Monday to Sunday time format conversion (Y --- ye...

Detailed explanation of the process of modifying Nginx files in centos7 docker

1. Install nginx in docker: It is very simple to ...

Docker image export, import and copy example analysis

The first solution is to push the image to a publ...

Understanding Nginx Current Limitation in One Article (Simple Implementation)

Nginx is now one of the most popular load balance...

Linux RabbitMQ cluster construction process diagram

1. Overall steps At the beginning, we introduced ...