CentOS Installation mysql57

Source: Internet
Author: User
Tags yum repolist

Download the source installation file

wget http://repo.mysql.com//mysql57-community-release-el7-8.noarch.rpm

wget https://repo.mysql.com//mysql57-community-release-el7-11.noarch.rpm


Install RPM packages locally (configure MySQL installation source)

Yum-y Localinstall mysql57-community-release-el7-11.noarch.rpm


View all MySQL installation sources (default MySQL installation version 5.7)

Yum Repolist All | grep MySQL


Close the MySQL 5.6 installation source

sudo yum-config-manager--disable mysql56-community


To open the MySQL 5.7 installation source

sudo yum-config-manager--enable mysql57-community
There is no Yum-config-manager command to install the Yum Install Yum-utils.noarch tool or edit/etc/yum.repos.d/ Mysql-community.repo file Enable entry of 1 means on, 0 for shutdown

VI command to modify Python version 2.7

Vi/usr/libexec/urlgrabber-ext-down

Yum-y Install Yum-utils

Vi/bin/yum-config-manager

Install MySQL

Yum-y Install Mysql-devel Mysql-community-server


Start MySQL

Systemctl Start Mysqld.service


Secure configuration MySQL

Mysql_secure_installation

Set Password

Use MySQL;

Update user set Password=password (' Password ') where user= ' root ';

Flush privileges;

Configuration

MySQL config file is/etc/my.cnf

Finally add the encoding configuration

[Mysql]default-character-set =utf8

The character encoding here must be consistent with the/usr/share/mysql/charsets/index.xml.

2. Remote connection Settings

Assign all permissions for all tables in all databases to the root user at all IP addresses.

Mysql> Grant all privileges on * * to [e-mail protected] '% ' identified by ' password ';

If you are a new user and not root, create a new user first

Mysql>create user ' username ' @ '% ' identified by ' password ';  

Restart MySQL

1, can put mysqld to/ETC/INIT.D
Restart with/etc/init.d/mysqld restart command
(CP Mysql-5.5.31/support-files/mysql.server/etc/init.d/mysqld)


2, or with Systemctl
Systemctl Restart MySQL
Or
Systemctl Restart MARIADB


3. Service MySQL Restart
Service MARIADB Restart

The remote connection is now available.

CentOS Installation mysql57

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.