Installation under mysql5.7.17 64-bit rhel6.5
Installation environment:
Rhel6.5_64
MySQL Community Server 5.7.17 64-bit
Download the yum installation source file:
Http://dev.mysql.com/get/mysql57-community-release-el6-9.noarch.rpm
Install downloaded mysql57-community-release-el6-9.noarch.rpm
[root@rhel-mysql] # rpm-Uvh mysql57-community-release-el6-9.noarch.rpm
Preparing... # [100%]
Package mysql57-community-release-el6-9.noarch is already installed
Run yum to install mysql
[root@rhel-mysql ~] # yum install mysql-server
After installation, start mysql
[root@rhel-mysql ~] # service mysqld start
Initializing MySQL database: [OK]-- the first time start will appear
Installing validate password plugin: [OK]-- the first time start will appear
Starting mysqld: [OK]
Get the initialization root password
[root@rhel-mysql ~] # grep "password" / var/log/mysqld.log
2016-12-13T15:52:48.468591Z 1 [Note] A temporary password is generated for root@localhost: Tyi > x show databases
+-+
| | Database |
+-+
| | information_schema |
| | mysql |
| | performance_schema |
| | sys |
+-+
4 rows in set (0.00 sec)
Root users have remote login rights
Mysql > grant all privileges on *. * to 'root'@'%' identified by' 1111111111 with grant option
Query OK, 0 rows affected, 1 warning (0.00 sec)
Create a database create datasase zhangsan
Mysql > create database zhangsan
Query OK, 1 row affected (0.00 sec)
Create a user
Mysql > CREATE USER 'hug'@'%' IDENTIFIED BY' 12345678'
Query OK, 0 rows affected (0.01 sec)
Authorization for new users
Mysql > grant all privileges on zhangsan.* to hug
Query OK, 0 rows affected (0.00 sec)
At this point, mysql 5.7.17 is set up.
Set mysql to start automatically. After the default installation, it starts by default under 3, 4 and 5.
[root@rhel-mysql] # chkconfig-- list mysqld
Mysqld 0:off 1:off 2:off 3:on 4:on 5:on 6:off
Modify whether mysqld is self-starting
[root@rhel-mysql] # chkconfig-- level 345 mysqld off
[root@rhel-mysql] # chkconfig-- list mysqld
Mysqld 0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@rhel-mysql] # chkconfig-- level 345 mysqld on
[root@rhel-mysql] # chkconfig-- list mysqld
Mysqld 0:off 1:off 2:off 3:on 4:on 5:on 6:off