用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呼叫阿里雲資料庫監控資料Python阿里資料庫
- Zabbix+Python監控Oracle資料庫PythonOracle資料庫
- Debian9.3上安裝和配置Observium監控平臺
- zanePerfor前端監控平臺效能優化之資料庫分表前端優化資料庫
- Windows平臺下安裝與配置MySQL5.7WindowsMySql
- 影片匯聚/安防監控/智慧監控EasyCVR平臺裝置錄影介面呼叫匯總VR
- zabbix監控平臺
- Centos7系統如何安裝MySQL5.7資料庫?CentOSMySql資料庫
- MySQL監控-Datadog資料庫監控調研MySql資料庫
- Linux安裝MariaDB資料庫-1Linux資料庫
- 1. PostgreSQL 資料庫安裝SQL資料庫
- 【MySQL資料庫】MySQL5.7安裝與配置、視覺化工具安裝和破解MySql資料庫視覺化
- Python量化資料倉儲搭建系列1:資料庫安裝與操作Python資料庫
- 資料庫監控---PIGOSS BSM資料庫Go
- 監控資料庫活動資料庫
- 資料庫繁忙程度監控資料庫
- Linux監控平臺介紹 zabbix監控介紹 安裝zabbix 忘記Admin密碼如何做Linux密碼
- 寶塔安裝mysql5.7資料庫怎麼連不上MySql資料庫
- linux監控平臺搭建Linux
- 【監控】Zabbix安裝
- GA/T1400檢視庫平臺EasyCVR大華裝置影片平臺智慧工廠安防影片監控預警方案VR
- DKHadoop大資料視覺化平臺監控功能深度解析Hadoop大資料視覺化
- python資料庫-MongoDB的安裝(53)Python資料庫MongoDB
- EHOME影片平臺EasyCVR影片分析裝置平臺電梯監控攝像機如何接入實現影片監控VR
- 資料庫平臺資料庫
- Zabbix監控神通資料庫教程資料庫
- shell監控mysql 8.0資料庫MySql資料庫
- shell監控mysql 5.7資料庫MySql資料庫
- .NET Core 跨平臺資源監控庫及 dotnet tool 小工具
- Zabbix監控平臺的搭建
- Prometheus + Grafana 監控平臺搭建PrometheusGrafana
- Zabbix監控安裝部署
- Prometheus和node exporter的安裝與監控資料說明PrometheusExport
- zabbix容器化安裝及監控docker應用Docker
- 大資料風控平臺需求大資料
- 資料庫DML監控一例資料庫
- MySQL | 零基礎入門經驗(1)安裝MySQL及建立資料庫MySql資料庫
- 大快DKH大資料基礎資料平臺的監控引數說明大資料
- GA/T1400檢視庫平臺EasyCVR影片裝置軌跡回放平臺智慧園區影片監控方案VR