Official website Download Install Mysql-server
# wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm# RPM-IVH mysql-community-release-el7-5.noarch.rpm# Yum Install Mysql-community-server
Restart the MySQL service after the installation is successful.
# Service Mysqld Restart
The initial installation of the Mysql,root account has no password.
[Email protected] yl]# mysql-u root Welcome to the MySQL monitor. Commands End With; or \g.your MySQL connection ID is 3Server version:5.6.26 mysql Community Server (GPL) Copyright (c), Oracle and /or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names trademarks of their respectiveowners. Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.mysql> show databases;+--------------------+| Database |+--------------------+| information_schema | | mysql | | performance_schema | | test
Set Password
You do not need to restart the database to take effect.
During the MySQL installation process, the following content:
Installed:
mysql-community-client.x86_64 0:5.6.26-2.el7 mysql-community-devel.x86_64 0:5.6.26-2.el7
mysql-community-libs.x86_64 0:5.6.26-2.el7 mysql-community-server.x86_64 0:5.6.26-2.el7
Dependency installed:
Mysql-community-common.x86_64 0:5.6.26-2.EL7
Replaced:
mariadb.x86_64 1:5.5.41-2.el7_0 mariadb-devel.x86_64 1:5.5.41-2.el7_0 mariadb-libs.x86_64 1:5.5.41-2.el7_0
Mariadb-server.x86_64 1:5.5.41-2.el7_0
Third, configuration mysql1, encoding
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 ';
The remote connection is now available.
Source: https://www.cnblogs.com/starof/p/4680083.html
CentOS 7 official website Download Install Mysql-server