Linux CentOS MySQL database installation and configuration tutorial

Linux CentOS MySQL database installation and configuration tutorial

Notes on installing MySQL database, share with everyone

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 a line validate_password=off

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 *.* to 'root'@'ip address' identified by 'password' with grant option; //You can change the ip to %%, which means all privileges are enabled

OK, I will try the local connection.

Okay, that’s the end. I hope you don’t encounter any bugs.

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Linux learning third Centos7 installation mysql5.7.16 database
  • Detailed explanation of wget command in Linux
  • Linux detects whether the server is connected to the network
  • Detailed explanation of the detailed configuration of sudo and its configuration file /etc/sudoers under Linux
  • How to use FTP on Windows desktop to upload files to Linux server
  • Detailed explanation of MySQL optimization examples in Linux
  • Linux backup and recovery and Linux file permissions detailed explanation
  • Detailed explanation of file descriptors and file pointers under Linux

<<:  Win2008 Server Security Check Steps Guide (Daily Maintenance Instructions)

>>:  WeChat applet development chapter: pitfall record

Recommend

HTML tutorial, understanding the optgroup element

Select the category selection. After testing, IE ...

MySQL slave library Seconds_Behind_Master delay summary

Table of contents MySQL slave library Seconds_Beh...

How to configure multiple projects with the same domain name in Nginx

There are two ways to configure multiple projects...

MYSQL unlock and lock table introduction

MySQL Lock Overview Compared with other databases...

How to use nginx as a load balancer for mysql

Note: The nginx version must be 1.9 or above. Whe...

Docker-compose quickly builds steps for Docker private warehouse

Create docker-compose.yml and fill in the followi...

About MySQL innodb_autoinc_lock_mode

The innodb_autoinc_lock_mode parameter controls t...

Robots.txt detailed introduction

Robots.txt is a plain text file in which website ...

Summary of react basics

Table of contents Preface start React Lifecycle R...

Detailed explanation of Vue's monitoring method case

Monitoring method in Vue watch Notice Name: You s...

How to check PCIe version and speed in Linux

PCIE has four different specifications. Let’s tak...

CSS3 mobile vw+rem method to achieve responsive layout without relying on JS

1. Introduction (1) Introduction to vw/vh Before ...

How to implement batch deletion of large amounts of data in MySQL large tables

The question is referenced from: https://www.zhih...

JavaScript Composition and Inheritance Explained

Table of contents 1. Introduction 2. Prototype ch...