方案描述
1. 適用范圍
2. 注意事項(xiàng)
為了避免新舊對(duì)象字符集不一致的情況,可以在配置文件將字符集和校驗(yàn)規(guī)則設(shè)置為舊版本的字符集和比較規(guī)則。
為了避免連接問題,可以仍采用5.7的mysql_native_password認(rèn)證插件。
8.0版本sql_mode不支持NO_AUTO_CREATE_USER,要避免配置的sql_mode中帶有NO_AUTO_CREATE_USER。
升級(jí)步驟
cd /usr/local/
# 文件夾重命名為mysql8:
mv mysql-8.0.19-linux-glibc2.12-x86_64 mysql8
# 更改文件夾所屬:
chown -R mysql.mysql /usr/local/mysql8/
sql_mode = STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
character-set-server = utf8
collation_server = utf8_general_ci
basedir = /usr/local/mysql8
skip_ssl
default_authentication_plugin=mysql_native_password
mysql> select version();
+------------+
| version() |
+------------+
| 5.7.23-log |
+------------+
1 row in set (0.00 sec)
mysql> show variables like innodb_fast_shutdown;
+----------------------+-------+
| Variable_name | Value |
+----------------------+-------+
| innodb_fast_shutdown | 1 |
+----------------------+-------+
1 row in set (0.00 sec)
# 確保數(shù)據(jù)都刷到硬盤上,更改成0。
mysql> set global innodb_fast_shutdown=0;
Query OK, 0 rows affected (0.00 sec)
mysql> shutdown;
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
[root@centos ~]# /usr/local/mysql8/bin/mysqld_safe --defaults-file=/etc/my.cnf --user=mysql &
[1] 23333
[root@centos ~]# 20XX-0X-20T07:07:02.337626Z mysqld_safe Logging to /data/mysql/logs/error.log.
20XX-0X-20T07:07:02.366244Z mysqld_safe Starting mysqld daemon with databases from /data/mysql/data
[root@centos ~]# mysql -uroot -p123456
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 17
Server version: 8.0.19 MySQL Community Server - GPL
Copyright (c) 2000, 2018, 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> select version();
+-----------+
| version() |
+-----------+
| 8.0.19 |
+-----------+
1 row in set (0.00 sec)
vi /etc/profile
# 將PATH中的/usr/local/mysql/bin改為/usr/local/mysql8/bin.
[root@centos ~]# source /etc/profile
[root@centos ~]# which mysql
/usr/local/mysql8/bin/mysql
[root@centos ~]# mysql -V
mysql Ver 8.0.19 for linux-glibc2.12 on x86_64 (MySQL Community Server - GPL)
文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請(qǐng)注明本文地址:http://m.specialneedsforspecialkids.com/yun/129375.html
摘要:但如果涉及到跨大版本升級(jí)比如升級(jí)到,這種直接替換軟件就不行了,因?yàn)榭绨姹镜膬?nèi)部存儲(chǔ)形式發(fā)生了變化官方對(duì)于升級(jí)提供了種方法,這里遷移我使用了來進(jìn)行處理細(xì)節(jié)可以參考官方文檔。 1 場(chǎng)景描述 最近使用 postgresql 命令行比較多,就找了個(gè)類似 mycli 工具,pgcli,這個(gè)是針對(duì) postgresql 的,興沖沖的安裝了 brew install pgcli 沒想到這貨自動(dòng)幫我...
摘要:準(zhǔn)備說明公司服務(wù)器為,安裝后的默認(rèn)版本是,在執(zhí)行命令時(shí)報(bào)錯(cuò)如下經(jīng)過一番搜索終于找到可行的辦法,即為升級(jí)版本,升級(jí)時(shí)間比較長(zhǎng),需要比較好的網(wǎng)絡(luò)支持版本檢測(cè)下使用檢測(cè)的版本系統(tǒng)檢測(cè)通過以上信息可知系統(tǒng)版本為位升級(jí)導(dǎo)入證書安 準(zhǔn)備 說明 公司服務(wù)器為centos,安裝git后的默認(rèn)版本是1.7.1,在執(zhí)行g(shù)it clone命令時(shí)報(bào)錯(cuò)如下: fatal: HTTP request...
閱讀 1353·2023-01-11 13:20
閱讀 1699·2023-01-11 13:20
閱讀 1211·2023-01-11 13:20
閱讀 1903·2023-01-11 13:20
閱讀 4161·2023-01-11 13:20
閱讀 2751·2023-01-11 13:20
閱讀 1397·2023-01-11 13:20
閱讀 3664·2023-01-11 13:20