This article mainly introduces the installation of mysql5.7 on CentOS and the detailed explanation of the simple configuration tutorial. It is very good and has reference value. Friends in need can refer to it
Installation
Make sure your user has permission to install
without switching root
su root
(su means: swich user)
# rpm -ivh
may encounter
warning: /var/tmp/rpm-tmp.6V5aFC: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
which can be ignored (personal opinion, Baidu Didn't find a suitable answer at once)
# yum install mysql-community-server
Waiting for the installation to complete....
Configuration
grep 'temporary password' ar/log/mysqld.logmysql 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;and then create a user
setenforce 0 vi/etc/selinux/configChange ENFORCE=enforcing to ENFORCE=disable
Windows: my.ini in the installation directory
[mysqld] default-character-set=utf8Versions after 5.6
[mysqld] character-set-server=utf8Modify the character set of the existing database
alter database mydb default character set utf8;Table names are not case-sensitive
[mysqld] lower_case_table_names=1Allow creation in log-bin mode
[mysqld] log_bin_trust_function_creators=trueEnable strict mode. If the field is too long in non-strict mode, it will be automatically truncated
[mysqld] sql-mode="STRICT_TRANS_TABLES"
The above is the detailed content of Detailed introduction to CentOS installation of mysql5.7 and simple configuration. For more information, please follow other related articles on the PHP Chinese website!