CentOS 7 Linux 装置 MySQL mysql 5.7ITeye - 娱乐之横扫全球

CentOS 7 Linux 装置 MySQL mysql 5.7ITeye

2019年03月26日08时41分16秒 | 作者: 若松 | 标签: 卸载,正在,彻底 | 浏览: 2819

#卸载mariadb/mysql 

[root@localhost mysql-5.7.18-1.el7.x86_64.rpm-bundle]# rpm -qa | grep mariadb

mariadb-5.5.52-1.el7.x86_64

mariadb-devel-5.5.52-1.el7.x86_64

mariadb-server-5.5.52-1.el7.x86_64

mariadb-libs-5.5.52-1.el7.x86_64

[root@localhost mysql-5.7.18-1.el7.x86_64.rpm-bundle]# rpm -e akonadi-mysql-1.9.2-4.el7.x86_64

[root@localhost mysql-5.7.18-1.el7.x86_64.rpm-bundle]# rpm -e mariadb-server-1:5.5.52-1.el7.x86_64

[root@localhost mysql-5.7.18-1.el7.x86_64.rpm-bundle]# rpm -e mariadb-devel-5.5.52-1.el7.x86_64

[root@localhost mysql-5.7.18-1.el7.x86_64.rpm-bundle]# rpm -e mariadb-5.5.52-1.el7.x86_64

[root@localhost mysql-5.7.18-1.el7.x86_64.rpm-bundle]# rpm -e perl-DBD-MySQL-4.023-5.el7.x86_64

[root@localhost mysql-5.7.18-1.el7.x86_64.rpm-bundle]# rpm -e qt-mysql-1:4.8.5-13.el7.x86_64

[root@localhost mysql-5.7.18-1.el7.x86_64.rpm-bundle]# rpm -e nodeps redhat-lsb-core-4.1-27.el7.centos.1.x86_64

[root@localhost mysql-5.7.18-1.el7.x86_64.rpm-bundle]# rpm -e postfix-2:2.10.1-6.el7.x86_64

[root@localhost mysql-5.7.18-1.el7.x86_64.rpm-bundle]# rpm -e qt3-MySQL-3.3.8b-51.el7.x86_64

[root@localhost mysql-5.7.18-1.el7.x86_64.rpm-bundle]# rpm -e qt5-qtbase-mysql-5.6.1-10.el7.x86_64

[root@localhost mysql-5.7.18-1.el7.x86_64.rpm-bundle]# rpm -e MySQL-python-1.2.5-1.el7.x86_64

[root@localhost mysql-5.7.18-1.el7.x86_64.rpm-bundle]# rpm -e mariadb-libs-5.5.52-1.el7.x86_64

[root@localhost mysql-5.7.18-1.el7.x86_64.rpm-bundle]# rpm -qa | grep mariadb

[root@localhost mysql-5.7.18-1.el7.x86_64.rpm-bundle]# rpm -qa | grep mysql

#到此彻底卸载mariadb/mysql

[root@localhost mysql-5.7.18-1.el7.x86_64.rpm-bundle]# rpm -ivh mysql-community-common-5.7.18-1.el7.x86_64.rpm

[root@localhost mysql-5.7.18-1.el7.x86_64.rpm-bundle]# rpm -ivh mysql-community-libs-5.7.18-1.el7.x86_64.rpm

[root@localhost mysql-5.7.18-1.el7.x86_64.rpm-bundle]# rpm -ivh mysql-community-client-5.7.18-1.el7.x86_64.rpm 

[root@localhost mysql-5.7.18-1.el7.x86_64.rpm-bundle]# rpm -ivh mysql-community-server-5.7.18-1.el7.x86_64.rpm

正告:mysql-community-server-5.7.18-1.el7.x86_64.rpm: 头V3 DSA/SHA1 Signature, 密钥 ID 5072e1f5: NOKEY

预备中...                          # [100%]

正在晋级/装置...

   1:mysql-community-server-5.7.18-1.e# [100%]

#发动效劳

[root@localhost mysql-5.7.18-1.el7.x86_64.rpm-bundle]# systemctl start mysqld

@localhost init.d]# /bin/systemctl start  mysqld.service

[root@localhost init.d]# chkconfig mysqld on

留意:正在将恳求转发到“systemctl enable mysqld.service”。

 

[nescafe@localhost mysql-5.7.18-1.el7.x86_64.rpm-bundle]$ rpm -ivh *rpm

[root@localhost mysql-5.7.18-1.el7.x86_64.rpm-bundle]# /bin/systemctl start  mysqld.service

[root@localhost mysql-5.7.18-1.el7.x86_64.rpm-bundle]# sudo grep temporary password /var/log/mysqld.log

2017-04-20T09:35:38.412872Z 1 [Note] A temporary password is generated for root@localhost: LC(7rVrhSSrw

[root@localhost mysql-5.7.18-1.el7.x86_64.rpm-bundle]# mysql -uroot -p

Enter password: 

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 19

Server version: 5.7.18

 

Copyright (c) 2000, 2017, 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 exit

Bye

[root@localhost mysql-5.7.18-1.el7.x86_64.rpm-bundle]# mysqladmin -p -u root shutdown

Enter password: 

版权声明
本文来源于网络,版权归原作者所有,其内容与观点不代表娱乐之横扫全球立场。转载文章仅为传播更有价值的信息,如采编人员采编有误或者版权原因,请与我们联系,我们核实后立即修改或删除。

猜您喜欢的文章