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

Why is it not recommended to use index as key in react?

1. Compare the old virtual DOM with the new virtu...

A record of a Linux server intrusion emergency response (summary)

Recently, we received a request for help from a c...

Detailed explanation of the use and precautions of crontab under Linux

Crontab is a command used to set up periodic exec...

Mysql join query principle knowledge points

Mysql join query 1. Basic concepts Connect each r...

HTML markup language - form

Click here to return to the 123WORDPRESS.COM HTML ...

Detailed explanation of explain type in MySQL

Introduction: In many cases, many people think th...

js uses Canvas to merge multiple pictures into one implementation code

Solution function mergeImgs(list) { const imgDom ...

Django2.* + Mysql5.7 development environment integration tutorial diagram

environment: MAC_OS 10.12 Python 3.6 mysql 5.7.25...

How to start and stop SpringBoot jar program deployment shell script in Linux

Without further ado, let me give you the code. Th...

Solutions to the failure and invalidity of opening nginx.pid

Table of contents 1. Problem Description 2. Probl...

MySQL trigger usage scenarios and method examples

trigger: Trigger usage scenarios and correspondin...

Tutorial on how to create a comment box with emoticons using HTML and CSS

HTML comment box with emoticons. The emoticons ar...