Remember once centos7.2 rpm mode installation mysql5.7.19 error

Source: Internet
Author: User
Tags safe mode uuid mysql login

0. Environment This article operating system: CentOS 7.2.1511 x86_64mysql version: 5.7.19
load the development environment before installing Yum Install GCC GCC  make Gd-devel libjpeg-devel libpngbzip2-devel libcurl-devel glib2 glib2-devel geoip-devel Ncurses-devel zlib Zlib-devel

Yum Install gcc* Net-tools perl

Yum-y Groupinstall "Development Tools" # #会一次安装很多常用的开发包, including the tools necessary to compile files such as gcc,g++.

1, uninstall the system comes with mariadb-lib[[email protected] ~]# rpm-qa|grep mariadb mariadb-libs-5.5.44-2.el7.centos.x86_64 [[Email  protected] ~]# rpm-e mariadb-libs-5.5.44-2.el7.centos.x86_64--nodeps2, download the mysql5.7.19 RPM installation package we need, Official website MySQL installation package is mysql-5.7.19-1.el7.x86_64.rpm-bundle.tar[[email protected] ~]# wget http://dev.mysql.com/get/ Downloads/mysql-5.7/mysql-5.7.16-1.el7.x86_64.rpm-bundle.tar then unzip [[Email protected]_node_1 src]# TAR-XVF  Mysql-5.7.16-1.el7.x86_64.rpm-bundle.tar mysql-community-libs-compat-5.7.16-1.el7.x86_64.rpm  mysql-community-devel-5.7.16-1.el7.x86_64.rpm mysql-community-minimal-debuginfo-5.7.16-1.el7.x86_64.rpm  mysql-community-libs-5.7.16-1.el7.x86_64.rpm mysql-community-common-5.7.16-1.el7.x86_64.rpm  mysql-community-embedded-compat-5.7.16-1.el7.x86_64.rpm mysql-community-test-5.7.16-1.el7.x86_64.rpm  mysql-community-embedded-devel-5.7.16-1.el7.x86_64.rpm mysql-community-server-minimal-5.7.16-1.el7.x86_64.rpm  mysql-community-server-5.7.16-1.el7.x86_64.rpmmysql-community-client-5.7.16-1.el7.x86_64.rpm MYSQL-COMMUNITY-EMBEDDED-5.7.16-1.EL7.X86_64.RPM3, The installation executes sequentially (several packages have dependencies, so execution has successively) the following command installs [[email protected] ~]# RPM-IVH mysql-community-common-5.7.16-1.el7.x86_64.rpm [ [email protected] ~]# rpm-ivh mysql-community-libs-5.7.16-1.el7.x86_64.rpm[[email protected] ~]# RPM-IVH mysql-community-client-5.7.16-1.el7.x86_64.rpm [[email protected] ~]# RPM-IVH  MYSQL-COMMUNITY-SERVER-5.7.16-1.EL7.X86_64.RPM in the installation of RPM-IVH mysql-community-server-5.7.16-1.el7.x86_64.rpm when the error is as follows: [[Email protected]_node_1 src]# RPM-IVH mysql-community-server-5.7.16-1.el7.x86_64.rpm Warning: Mysql-community-server-5.7.16-1.el7.x86_64.rpm:header V3 dsa/sha1 Signature, key ID 5072e1f5:nokey error:failed depend  Encies: Libaio.so.1 () (64bit) is needed by mysql-community-server-5.7.16-1.el7.x86_64 Libaio.so.1 (libaio_0.1) (64bit) is needed by mysql-community-server-5.7.16-1.el7.x86_64 Libaio.so.1 (libaio_0.4) ( 64bit) is needed by mysql-community-server-5.7.16-1.el7.x86_64   This error means that the Libaio package needs to be installed: You can install yum, install Libaio-0.3.107-10.el6.x86_64.rpm,:wget http://mirror.centos.org/centos/6/os/x86 _64/PACKAGES/LIBAIO-0.3.107-10.EL6.X86_64.RPM4, database initialization in order to ensure that the database directory is the owner of the file for MySQL login user, if you are running the MySQL service as root,  The following command is required to initialize the mysqld--initialize--user=mysql if you are running as MySQL, you can remove the--user option. In addition, the--initialize option is initialized in "safe" mode by default, a password is generated for the root user and the password is marked as expired, and you need to set a new password after logging in, while using the--initialize-insecure command does not use Safe mode.  The root user generates a password. This demo uses the--initialize initialized, will generate a root account password, the password in the log file, the red area is automatically generated password [[Email protected]_node_1 src]# cat/var/log/ Mysqld.log 2016-12-07t04:41:58.028558z 0 [Warning] TIMESTAMP with implicit the DEFAULT value is deprecated.  --explicit_defaults_for_timestamp server option (see documentation for more details). 2016-12-07t04:41:58.315188z 0 [Warning] innodb:new log files created, lsn=45790 2016-12-07t04:41:58.355114z 0 [Warning]  Innodb:creating FOREIGN KEY constraint system tables. 2016-12-07t04:41:58.418448z 0 [Warning] No existing UUID has been Found, so we assume it is the first time which this server has been started.  Generating a new UUID:7CC98831-BC37-11E6-A263-000C29F902DC. 2016-12-07t04:41:58.419935z 0 [Warning] Gtid table is not a ready-to-be used.  Table ' mysql.gtid_executed ' cannot be opened. 2016-12-07t04:41:58.420558z 1 [Note] A temporary password is generated for [email protected]:hm9dkgzqdm:w  
  Start MySQL database now systemctl start Mysqld.service [[Email protected]_node_1 src]# systemctl start mysqld.service [email   protected]_node_1 src]# mysql-uroot-p Enter password:welcome to the MySQL monitor. Commands End With;  or \g. Your MySQL Connection ID is 2 Server version:5.7.16 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> 5, change password This password is marked as expired, if you want to use the normal also need to change password mysql> show databases;   ERROR 1820 (HY000): Must reset your password using ALTER USER statement before executing this statement.   The previous password () function will be discarded, and the official recommendation is to use the following command to modify the password mysql> ALTER USER ' root ' @ ' localhost ' identified by ' new_password '; Also, if the password you set is too simple, you will get an error. Mysql> ALTER USER ' root ' @ ' localhost ' identified by ' 123 '; ERROR 1819 (HY000): Your PAssWOrd does not satisfy the current policy requirements 

Specific rules about setting passwords, you can see the official documents;

here we pay attention to setting the password The length is greater than 8, at the same time to have numbers, case, special characters.

Remote permissions

  Grant all privileges on * * to [email protected]'%'password123! ' with grant option;  Flush privileges;

This allows you to log on with the remote client.

  

Remember once centos7.2 rpm mode installation mysql5.7.19 error

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.