Centos 6.5 installation MySQL 5.7.18

Source: Internet
Author: User
Tags uuid

1, first download MySQL 5.7.18 on MySQL website

2 Installing MySQL

Install the dependency package first: Yum install libaio-y

Create MySQL users and groups

Groupadd MySQL

Useradd mysql-g MySQL

Create MySQL installation directory

Unzip MySQL to the installation directory

Create Data Catalog and authorization

Cd/usr/local/mysql

mkdir var && mkdir data

Cd/usr/local

Chmod-r 755 mysql/

Chown Root:mysql mysql/

CD MySQL

Chown-r Mysql:mysql *

Initialize MySQL

[Email protected] mysql]#/bin/mysqld--user=mysql--basedir=/usr/local/mysql--datadir=/usr/local/mysql/data-- Initialize
2017-05-04T22:46:35.096810Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-05-04t22:46:36.171880z 0 [Warning] innodb:new log files created, lsn=45790
2017-05-04t22:46:37.553352z 0 [Warning] innodb:creating FOREIGN KEY constraint system tables.
2017-05-04t22:46:37.777380z 0 [Warning] No existing UUID have been found, so we assume that's the first time that thi s server has been started. Generating a new uuid:883ca086-311b-11e7-bd73-080027e6059a.
2017-05-04T22:46:37.808310Z 0 [Warning] Gtid table is not a ready-to-be used. Table ' mysql.gtid_executed ' cannot be opened.
2017-05-04t22:46:39.739908z 0 [Warning] CA certificate Ca.pem is self signed.
2017-05-04t22:46:39.946178z 1 [Note] A temporary password is generated for [email protected]: >wd7uav4layt

Note: >wd7uav4layt is the temporary password for root.

Start MySQL

[[email protected] mysql]#./support-files/mysql.server start
Starting mysql.logging to '/usr/local/mysql/data/mysql.err '.
. success!

Join System Services

[email protected] mysql]# CP support-files/mysql.server/etc/init.d/mysqld
[Email protected] mysql]#
[Email protected] mysql]#
[Email protected] mysql]# chmod +x/etc/init.d/mysqld
[Email protected] mysql]#/etc/init.d/mysqld restart
Shutting down MySQL. success!
Starting MySQL. success!

Modify MySQL Password

[Email protected] mysql]#/usr/local/mysql/bin/mysql-u root-p
Enter Password:
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 3
Server Version:5.7.18-enterprise-commercial-advanced-log

Copyright (c), Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of the Oracle Corporation and/or its
Affiliates. Other names trademarks of their respective
Owners.

Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.

Mysql> set Password=password (' mima666 ');
Query OK, 0 rows affected, 1 warning (0.01 sec)

mysql> flush Privileges;
Query OK, 0 rows affected (0.01 sec)

Client Startup

[Email protected] mysql]# ln-s/usr/local/mysql/bin/*/usr/bin/

Centos 6.5 installation MySQL 5.7.18

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.