Detailed installation and configuration tutorial of mysql5.7 on CentOS

Detailed installation and configuration tutorial of mysql5.7 on CentOS

Install

Make sure your user has permission to install

No root switch

su root

(su means: switch user)

# rpm -ivh http://dev.mysql.com/get/mysql57-community-release-el6-9.noarch.rpm

You may encounter

warning: /var/tmp/rpm-tmp.6V5aFC: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

Can be ignored (personal opinion, Baidu did not find a suitable answer)

# yum install mysql-community-server

Waiting for the installation to complete....

Configuration

After installation, the initial password can be found here:

grep 'temporary password' ar/log/mysqld.log

MySQL 5.7 has requirements for password complexity. If you want to create a simple password, you can first execute

set global validate_password_policy=0;

Create a user again

Please turn off SELinux on the newly installed server, otherwise you may encounter many problems caused by permissions.

setenforce 0
vi /etc/selinux/config

Change ENFORCE=enforcing to ENFORCE=disable

Configuration Files

Linux: /etc/my.cnf
Windows: my.ini in the installation directory

Default character set

Versions prior to 5.6

[mysqld]
default-character-set=utf8

Versions after 5.6

[mysqld]
character-set-server=utf8

Modify the character set of an existing database

alter database mydb default character set utf8;

Table names are not case sensitive

[mysqld]
lower_case_table_names=1

Allows creation of functions in log-bin mode

[mysqld]
log_bin_trust_function_creators=true

Enable strict mode. In non-strict mode, fields that are too long will be automatically truncated.

[mysqld]
sql-mode="STRICT_TRANS_TABLES"

The above is the detailed introduction of CenOS installation of MySQL 5.7 and simple configuration tutorial. I hope it will be helpful to everyone. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

You may also be interested in:
  • CentOS 6.5 installation mysql5.7 tutorial
  • CentOS6.8 uses cmake to install MySQL5.7.18
  • Detailed tutorial on installing MySQL 5.7.18 under CentOS 6.5
  • Deploy MySQL 5.7.17 binary installation and multi-instance configuration on CentOS 6.5
  • Install mysql5.7.13 using RPM in CentOS 7
  • MySQL 5.7 installation and configuration tutorial under CentOS7 (YUM)
  • Tutorial on compiling and installing mysql5.7 under centos 7 system
  • CentOS 7.2.1511 compile and install Nginx1.10.1+MySQL5.7.14+PHP7.0.11
  • Detailed explanation of how to compile and install PHP7.0.10+MySQL5.7.14+Nginx1.10.1 under CentOS 7.2 (mini version)
  • Linux learning third Centos7 installation mysql5.7.16 database

<<:  10 Popular Windows Apps That Are Also Available on Linux

>>:  Bootstrap FileInput implements image upload function

Recommend

Detailed explanation of common methods of Vue development

Table of contents $nextTick() $forceUpdate() $set...

Detailed explanation of creating stored procedures and functions in mysql

Table of contents 1. Stored Procedure 1.1. Basic ...

HTML+CSS to achieve simple navigation bar function

Without further ado, I'll go straight to the ...

Detailed explanation of Linux curl form login or submission and cookie usage

Preface This article mainly explains how to imple...

How to view the status of remote server files in Linux

As shown below: The test command determines wheth...

Linux directory switching implementation code example

Switching files is a common operation in Linux. W...

Analysis of Linux Zabbix custom monitoring and alarm implementation process

Target Display one of the data in the iostat comm...

Three ways to achieve text flashing effect in CSS3 Example code

1. Change the transparency to achieve the gradual...

Solution to the failure of docker windows10 shared directory mounting

cause When executing the docker script, an error ...

How to configure the same domain name for the front and back ends of nginx

This article mainly introduces the method of conf...

js to write the carousel effect

This article shares the specific code of js to ac...

How to collect Nginx logs using Filebeat

Nginx logs can be used to analyze user address lo...

Detailed explanation of Angular component projection

Table of contents Overview 1. Simple Example 1. U...

Summary of the differences between global objects in nodejs and browsers

In Node.js, a .js file is a complete scope (modul...