Installing Mysql5.7 under CentOS

Source: Internet
Author: User

Upgrade, recommend restart after completion

Yum -y update

Uninstall the installed MySQL

Yum -y remove Mysql-libs

Installation dependencies

Yum Install Numactl-libs

Download the installation package

wgetHttps//cdn.mysql.com//downloads/mysql-5.7/mysql-community-common-5.7.19-1.el7.x86_64.rpmwgetHttps//cdn.mysql.com//downloads/mysql-5.7/mysql-community-libs-5.7.19-1.el7.x86_64.rpmwgetHttps//cdn.mysql.com//downloads/mysql-5.7/mysql-community-libs-compat-5.7.19-1.el7.x86_64.rpmwgetHttps//cdn.mysql.com//downloads/mysql-5.7/mysql-community-client-5.7.19-1.el7.x86_64.rpmwgetHttps//cdn.mysql.com//downloads/mysql-5.7/mysql-community-server-5.7.19-1.el7.x86_64.rpm

Installation

RPM-IVH mysql-community-common-5.7. +-1. el7.x86_64.rpm--nosignaturerpm-IVH mysql-community-libs-5.7. +-1. el7.x86_64.rpm--nosignaturerpm-IVH mysql-community-libs-compat-5.7. +-1. el7.x86_64.rpm--nosignaturerpm-IVH mysql-community-client-5.7. +-1. el7.x86_64.rpm--nosignaturerpm-IVH mysql-community-server-5.7. +-1. el7.x86_64.rpm--nosignature

Start

Service mysqld Start

View initial Password

grep " Password " /var/log/mysqld.log

Change password immediately after logging in to MySQL

' Root '@'localhost' = PASSWORD ('newpass');

This may indicate that the password does not meet the requirements, enter the following statement and then re-modify the password

Set global validate_password_policy=0;

Set power-on self-boot

Chkconfig mysqld on

Modify MySQL Configuration

Vim/etc/my.cnf

Revision changed to

[Client]port=3306default-character-set=utf8mb4[mysqld]port=3306 character-set-client-handshake=0character_set_server=utf8mb4collation- server=utf8mb4_unicode_cidatadir=/var/lib/mysqlsocket=/var/lib/mysql/  Mysql.socksymbolic-links=0log-error=/var/log/mysqld.logpid-file =/var/run/mysqld/mysqld.pid

Installing Mysql5.7 under CentOS

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.