用python建立資料庫監控平臺(1)安裝MySQL5.7
本系列文章思路來自微信公眾號:宅必備
1、先解除安裝原有版本mysql
rpm -qa|grep mysql
[root@monit usr]# rpm -qa|grep mysql
mysql-5.1.71-1.el6.x86_64 --解除安裝
mysql-libs-5.1.71-1.el6.x86_64 --解除安裝
mysql57-community-release-el6-11.noarch
qt-mysql-4.6.2-26.el6_4.x86_64
mysql-server-5.1.71-1.el6.x86_64 --解除安裝
rpm -e mysql-5.1.71-1.el6.x86_64 --nodeps
rpm -e mysql-libs-5.1.71-1.el6.x86_64 --nodeps
rpm -e mysql-server-5.1.71-1.el6.x86_64 --nodeps
2解壓並安裝mysql5.7
[root@monit usr]# tar -xvf mysql-5.7.19-1.el6.x86_64.rpm-bundle.tar
mysql-community-libs-5.7.19-1.el6.x86_64.rpm
mysql-community-devel-5.7.19-1.el6.x86_64.rpm
mysql-community-embedded-5.7.19-1.el6.x86_64.rpm
mysql-community-common-5.7.19-1.el6.x86_64.rpm
mysql-community-libs-compat-5.7.19-1.el6.x86_64.rpm
mysql-community-server-5.7.19-1.el6.x86_64.rpm
mysql-community-test-5.7.19-1.el6.x86_64.rpm
mysql-community-embedded-devel-5.7.19-1.el6.x86_64.rpm
mysql-community-client-5.7.19-1.el6.x86_64.rpm
安裝順序:
[root@monit usr]# rpm -ivh mysql-community-common-5.7.19-1.el6.x86_64.rpm
[root@monit usr]# rpm -ivh mysql-community-libs*
[root@monit usr]# rpm -ivh mysql-community-devel-5.7.19-1.el6.x86_64.rpm
[root@monit usr]# rpm -ivh mysql-community-embedded*
[root@monit usr]# rpm -ivh mysql-community-client-5.7.19-1.el6.x86_64.rpm
[root@monit usr]# rpm -ivh mysql-community-server-5.7.19-1.el6.x86_64.rpm
3、啟動mysql服務,修改root密碼
[root@monit usr]# service mysqld start
Initializing MySQL database: [ OK ]
Starting mysqld: [ OK ]
[root@monit usr]# grep 'temporary password' /var/log/mysqld.log
2017-08-07T12:10:35.283652Z 1 [Note] A temporary password is generated for root@localhost: pC,s-ywwh5s9
[root@monit usr]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.19
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)
1、先解除安裝原有版本mysql
rpm -qa|grep mysql
[root@monit usr]# rpm -qa|grep mysql
mysql-5.1.71-1.el6.x86_64 --解除安裝
mysql-libs-5.1.71-1.el6.x86_64 --解除安裝
mysql57-community-release-el6-11.noarch
qt-mysql-4.6.2-26.el6_4.x86_64
mysql-server-5.1.71-1.el6.x86_64 --解除安裝
rpm -e mysql-5.1.71-1.el6.x86_64 --nodeps
rpm -e mysql-libs-5.1.71-1.el6.x86_64 --nodeps
rpm -e mysql-server-5.1.71-1.el6.x86_64 --nodeps
2解壓並安裝mysql5.7
[root@monit usr]# tar -xvf mysql-5.7.19-1.el6.x86_64.rpm-bundle.tar
mysql-community-libs-5.7.19-1.el6.x86_64.rpm
mysql-community-devel-5.7.19-1.el6.x86_64.rpm
mysql-community-embedded-5.7.19-1.el6.x86_64.rpm
mysql-community-common-5.7.19-1.el6.x86_64.rpm
mysql-community-libs-compat-5.7.19-1.el6.x86_64.rpm
mysql-community-server-5.7.19-1.el6.x86_64.rpm
mysql-community-test-5.7.19-1.el6.x86_64.rpm
mysql-community-embedded-devel-5.7.19-1.el6.x86_64.rpm
mysql-community-client-5.7.19-1.el6.x86_64.rpm
安裝順序:
[root@monit usr]# rpm -ivh mysql-community-common-5.7.19-1.el6.x86_64.rpm
[root@monit usr]# rpm -ivh mysql-community-libs*
[root@monit usr]# rpm -ivh mysql-community-devel-5.7.19-1.el6.x86_64.rpm
[root@monit usr]# rpm -ivh mysql-community-embedded*
[root@monit usr]# rpm -ivh mysql-community-client-5.7.19-1.el6.x86_64.rpm
[root@monit usr]# rpm -ivh mysql-community-server-5.7.19-1.el6.x86_64.rpm
3、啟動mysql服務,修改root密碼
[root@monit usr]# service mysqld start
Initializing MySQL database: [ OK ]
Starting mysqld: [ OK ]
[root@monit usr]# grep 'temporary password' /var/log/mysqld.log
2017-08-07T12:10:35.283652Z 1 [Note] A temporary password is generated for root@localhost: pC,s-ywwh5s9
[root@monit usr]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.19
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)
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29067253/viewspace-2144274/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 用python建立資料庫監控平臺(2)安裝pipPython資料庫
- 用python建立資料庫監控平臺(3)安裝Python3.5Python資料庫
- 用python建立資料庫監控平臺(4)安裝Python擴充套件Python資料庫套件
- 資料倉儲監控平臺
- BWBCS資料監控平臺
- zanePerfor前端監控平臺效能優化之資料庫分表前端優化資料庫
- 資料庫監控資料庫
- Debian9.3上安裝和配置Observium監控平臺
- Zabbix+Python監控Oracle資料庫PythonOracle資料庫
- zabbix監控平臺
- Python呼叫阿里雲資料庫監控資料Python阿里資料庫
- 影片匯聚/安防監控/智慧監控EasyCVR平臺裝置錄影介面呼叫匯總VR
- Windows平臺下不能建立資料庫連線出錯分析 (1)Windows資料庫
- cacti監控(1)基礎安裝apachemysqlphpApacheMySqlPHP
- Linux平臺上手動解除安裝Oracle資料庫LinuxOracle資料庫
- window平臺下手動建立資料庫演示資料庫
- 資料庫效能監控資料庫
- 多臺ORACLE資料庫表空間監控方案Oracle資料庫
- TimesTen_安裝-建立資料庫資料庫
- Centos7系統如何安裝MySQL5.7資料庫?CentOSMySql資料庫
- 1. PostgreSQL 資料庫安裝SQL資料庫
- 靜默安裝資料庫介質和建立資料庫資料庫
- MySQL監控-Datadog資料庫監控調研MySql資料庫
- 資料庫繁忙程度監控資料庫
- 資料庫監控軟體資料庫
- SQL Server資料庫監控SQLServer資料庫
- 資料庫監控指令碼資料庫指令碼
- 監控Oracle資料庫方法Oracle資料庫
- 監控資料庫指令碼資料庫指令碼
- zabbix監控oracle資料庫Oracle資料庫
- 【MySQL資料庫】MySQL5.7安裝與配置、視覺化工具安裝和破解MySql資料庫視覺化
- 【監控】Zabbix安裝
- Zabbix監控平臺的搭建
- linux監控平臺搭建Linux
- Python量化資料倉儲搭建系列1:資料庫安裝與操作Python資料庫
- Oracle安裝軟體及建立資料庫(字元安裝方式)Oracle資料庫字元
- 資料庫平臺資料庫
- Linux監控平臺介紹 zabbix監控介紹 安裝zabbix 忘記Admin密碼如何做Linux密碼