是時候用PerconaDB替換MySQL了

2021-09-30 20:31:18 字數 3793 閱讀 1101

percona資料庫伺服器是mysql的增強版,替代mysql並不複雜。

1)查詢速度更快,資料的一致性更好

2)伺服器執行及其穩定

3)可以延遲分片,或者避免分片

4)需要支付的費用比mysql低

5)在優化和管理方面花費的時間更少

6)更高的正常執行時間

7)不排除猜測

還有一些特性:

1)數量更多的information_schema表

2)數量更多的全域性效能引數(global performance)和狀態計數器(status counters)

3)每個索引效能計數器

4)每個使用者效能計數器

5)每個客戶端效能計數器

6)高精度程序列表時序

7)快速校驗演算法

8)緩衝池預載入

9)支援快閃儲存器緩衝

10)可從不同的伺服器匯入表

1)確保當前的資料得到了備份

# cp -rf /var/lib/mysql /var/lib/mysql-orig# mv /etc/my.cnf /etc/my.cnf.orig
2)禁用目標,讓cpanel不處理mysql更新

# /scripts/update_local_rpm_versions --edit target_settings.mysql50 uninstalled# /scripts/update_local_rpm_versions --edit target_settings.mysql51 uninstalled# /scripts/update_local_rpm_versions --edit target_settings.mysql55 uninstalled
3)從伺服器移除所有的mysql rpm包

# /scripts/check_cpanel_rpms --fix --targets=mysql50,mysql51,mysql55
上面的命令會從伺服器解除安裝mysql rpm安裝

4)建立資料庫配置檔案perconadb.repo

# vi /etc/yum.repos.d/perconadb.repo
新增下面的內容:

[percona]name = centos $releasever - perconabaseurl= = 1gpgkey =  = 1
5)在/etc/yum.conf檔案內的「exclude」列表中移除php

6)安裝perconadb-server、perconadb-client和perconadb-devel

# yum install percona-server-client-55 percona-server-server-55 percona-server-devel-55
7)啟動percona mysql

# /etc/init.d/mysql start
8)然後執行percona mysql公升級

# mysql_upgrade
9)重啟percona mysql

# /etc/init.d/mysql restart
10)把php新增回/etc/yum.conf檔案內的「exclude」列表中

11)用php重編譯apache

# /scripts/easyapache --build/etc/init.d/mysql status success! mysql (percona server) running (9425)
ok!

再分享一下我老師大神的人工智慧教程吧。零基礎!通俗易懂!風趣幽默!還帶黃段子!希望你也加入到我們人工智慧的隊伍中來!

percona資料庫伺服器是mysql的增強版,替代mysql並不複雜。

1)查詢速度更快,資料的一致性更好

2)伺服器執行及其穩定

3)可以延遲分片,或者避免分片

4)需要支付的費用比mysql低

5)在優化和管理方面花費的時間更少

6)更高的正常執行時間

7)不排除猜測

還有一些特性:

1)數量更多的information_schema表

2)數量更多的全域性效能引數(global performance)和狀態計數器(status counters)

3)每個索引效能計數器

4)每個使用者效能計數器

5)每個客戶端效能計數器

6)高精度程序列表時序

7)快速校驗演算法

8)緩衝池預載入

9)支援快閃儲存器緩衝

10)可從不同的伺服器匯入表

1)確保當前的資料得到了備份

# cp -rf /var/lib/mysql /var/lib/mysql-orig# mv /etc/my.cnf /etc/my.cnf.orig
2)禁用目標,讓cpanel不處理mysql更新

# /scripts/update_local_rpm_versions --edit target_settings.mysql50 uninstalled# /scripts/update_local_rpm_versions --edit target_settings.mysql51 uninstalled# /scripts/update_local_rpm_versions --edit target_settings.mysql55 uninstalled
3)從伺服器移除所有的mysql rpm包

# /scripts/check_cpanel_rpms --fix --targets=mysql50,mysql51,mysql55
上面的命令會從伺服器解除安裝mysql rpm安裝

4)建立資料庫配置檔案perconadb.repo

# vi /etc/yum.repos.d/perconadb.repo
新增下面的內容:

[percona]name = centos $releasever - perconabaseurl= = 1gpgkey =  = 1
5)在/etc/yum.conf檔案內的「exclude」列表中移除php

6)安裝perconadb-server、perconadb-client和perconadb-devel

# yum install percona-server-client-55 percona-server-server-55 percona-server-devel-55
7)啟動percona mysql

# /etc/init.d/mysql start
8)然後執行percona mysql公升級

# mysql_upgrade
9)重啟percona mysql

# /etc/init.d/mysql restart
10)把php新增回/etc/yum.conf檔案內的「exclude」列表中

11)用php重編譯apache

# /scripts/easyapache --build/etc/init.d/mysql status success! mysql (percona server) running (9425)
ok!

什麼時候用exists 什麼時候用in

in not in exists not exists 使用exists,oracle會首先檢查主查詢,然後執行子查詢直到它找到第乙個匹配項,這就節省了時間。oracle在執行in子查詢時,首先執行 子查詢,並將獲得的結果列表存放在乙個加了索引的臨時表中。在執行子查詢之前,系統先將主查詢掛起 待子查...

初到南方 屋裡滿是潮濕?是時候用除濕機

黑雲翻墨未遮山,白雨跳珠亂入船 這是蘇軾筆下的南方。很多人都說喜歡南方的天氣,確實居住在南方是非常舒適的。但是有乙個問題,那就是太太太太潮濕啦。就連現在生活在北方城市的我,要是連著好幾天下雨的話就忍受不了。睡得被子潮潮的 衣服還幾天都幹不了,最讓人頭疼的事情恐怕就是這了。不過前段時間朋友送了我一台除...

什麼時候用GET?什麼時候用POST?

get和post兩種方法都是將資料送到伺服器,但你該用哪一種呢?http標準包含這兩種方法是為了達到不同的目的。post用於建立資源,資源的內容會被編入http請示的內容中。例如,處理訂貨表單 在資料庫中加入新資料行等。當請求無 時 如進行搜尋 便可使用get方法 當請求有 時 如新增資料行 則用p...