CentOS installation of mysql5.7 and simple configuration tutorial details, centosmysql5.7

Source: Internet
Author: User

CentOS installation of mysql5.7 and simple configuration tutorial details, centosmysql5.7

Install

Ensure that your users have the permission to install

Root not switched

Su root

(Su meaning: swich user)

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

May encounter

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

Can ignore (personal opinion, Baidu does not find a suitable answer)

# yum install mysql-community-server 

Wait until installation is complete ....

Configuration

Find the initial password after installation here:

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

Mysql 5.7 requires Password Complexity. To create a simple password, run

set global validate_password_policy=0;

Create another user

When a newly installed server is installed, disable SELinux. Otherwise, many permissions may occur.

setenforce 0vi/etc/selinux/config

Change ENFORCE = enforcing to ENFORCE = disable

Configuration File

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

Default Character Set

Versions earlier than 5.6

[mysqld]default-character-set=utf8 

Versions later than 5.6

[mysqld]character-set-server=utf8

Modify the character set of an existing database

alter database mydb default character set utf8;

The table name is case insensitive.

[mysqld]lower_case_table_names=1

Allow function creation in log-bin Mode

[mysqld]log_bin_trust_function_creators=true

When strict mode is enabled, fields that are too long will be automatically truncated in non-strict mode.

[mysqld]sql-mode="STRICT_TRANS_TABLES"

The above section describes how to install mysql5.7 on CenOS and how to configure it in simple mode. I hope it will be helpful to you. If you have any questions, please leave a message and I will reply to you in a timely manner. Thank you very much for your support for the help House website!

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.