日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

mysql 5.6到percona 5.6小版本升级

發布時間:2025/4/16 47 豆豆
生活随笔 收集整理的這篇文章主要介紹了 mysql 5.6到percona 5.6小版本升级 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

假設原來是mysql 5.6.19社區版,現在要升級到percona server 5.6.30。

對于大的數據庫來說,采用mysqldump方式進行遷移太花費時間了,可采用新安裝加載原來數據庫的方式大大節約升級時間。

對于mysql升級來說,一個主要的步驟就是升級后權限的同步更新以及數據表的校驗。

假設原來為/usr/local/mysql->?mysql-5.6.19-linux-glibc2.5-x86_64,數據庫在data目錄下。

0、停止現有實例,/usr/local/mysql/bin/mysqladmin -u -p shutdown?

1、首先,刪除原來的符號鏈接rm rf /usr/local/mysql;

2、解壓Percona-Server-5.6.30-rel76.3-Linux.x86_64.ssl101.tar.gz到當前目錄;

3、創建新的符號鏈接ln -s Percona-Server-5.6.30-rel76.3-Linux.x86_64.ssl101?mysql

4、更改my.cnf,去掉datadir、basedir注釋,如下:

??? basedir = /usr/local/mysql?#指向最新的mysql實例

??? datadir = /usr/local/mysql-5.6.19-linux-glibc2.5-x86_64/data?指向原來的mysql數據庫目錄

????其他配置可以保持不變。。。

5、使用新的安裝包創建啟動mysql實例:/usr/local/mysql/bin/mysqld_safe --user=mysql &

6、執行mysql_upgrade

[root@localhost bin]# ./mysql_upgrade -uroot -p
Warning: Using a password on the command line interface can be insecure.
Looking for 'mysql' as: ./mysql
Looking for 'mysqlcheck' as: ./mysqlcheck
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.
mysql.columns_priv???????????????????????????????? OK
mysql.db?????????????????????????????????????????? OK
mysql.event??????????????????????????????????????? OK
mysql.func???????????????????????????????????????? OK
mysql.general_log????????????????????????????????? OK
mysql.help_category??????????????????????????????? OK
mysql.help_keyword???????????????????????????????? OK
mysql.help_relation??????????????????????????????? OK
mysql.help_topic?????????????????????????????????? OK
mysql.innodb_index_stats?????????????????????????? OK
mysql.innodb_table_stats?????????????????????????? OK
mysql.ndb_binlog_index???????????????????????????? OK
mysql.plugin?????????????????????????????????????? OK
mysql.proc???????????????????????????????????????? OK
mysql.procs_priv?????????????????????????????????? OK
mysql.proxies_priv???????????????????????????????? OK
mysql.servers????????????????????????????????????? OK
mysql.slave_master_info??????????????????????????? OK
mysql.slave_relay_log_info???????????????????????? OK
mysql.slave_worker_info??????????????????????????? OK
mysql.slow_log???????????????????????????????????? OK
mysql.tables_priv????????????????????????????????? OK
mysql.time_zone??????????????????????????????????? OK
mysql.time_zone_leap_second??????????????????????? OK
mysql.time_zone_name?????????????????????????????? OK
mysql.time_zone_transition???????????????????????? OK
mysql.time_zone_transition_type??????????????????? OK
mysql.user???????????????????????????????????????? OK
Running 'mysql_fix_privilege_tables'...
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.
mig_db.mig_tab???????????????????????????????????? OK
mig_db.mig_tab2??????????????????????????????????? OK
OK

7、重啟mysql實例。

8、客戶端驗證,可發現所有數據和存儲過程均正常。

《新程序員》:云原生和全面數字化實踐50位技術專家共同創作,文字、視頻、音頻交互閱讀

總結

以上是生活随笔為你收集整理的mysql 5.6到percona 5.6小版本升级的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。