Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Installation under mysql5.7.17 64-bit rhel6.5

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report