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!