1、解压tar包
[root@hhu MysqL]# ls
2、卸载已有老版本MysqL
MysqL-5.1.71-1.el6.x86_64
MysqL-devel-5.1.71-1.el6.x86_64
MysqL-libs-5.1.71-1.el6.x86_64
error: Failed dependencies:
MysqL-5.1.71-1.el6.x86_64
MysqL-libs-5.1.71-1.el6.x86_64
error: Failed dependencies:
libMysqLclient.so.16(libMysqLclient_16)(64bit) is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64
MysqL-libs is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64
[root@hhu MysqL]#
3、安装MysqL包,一共5个,会有依赖关系,安装顺序如下:
[root@hhu MysqL]# ls
warning: MysqL-community-common-5.7.17-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
warning: MysqL-community-libs-5.7.17-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
warning: MysqL-community-libs-compat-5.7.17-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
warning: MysqL-community-client-5.7.17-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
warning: MysqL-community-server-5.7.17-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
MysqLd is stopped
Initializing MysqL database: [ OK ]
Installing validate password plugin: [ OK ]
Starting MysqLd: [ OK ]
2017-02-23T01:36:39.249352Z 1 [Note] A temporary password is generated for root@localhost: i7NmqxstDZ?L
Enter password:
Welcome to the MysqL monitor. Commands end with ; or \g.
Your MysqL connection id is 4
Server version: 5.7.17
copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered Trademark of Oracle Corporation and/or its
affiliates. Other names may be Trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MysqL> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';
Query OK, 0 rows affected (0.00 sec)
MysqL> quit
Bye
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。