Upgrade to MariaDB Community Server 10.6 on CentOS 8

Upgrade to MariaDB Community Server 10.6 on CentOS 8

mariadb-and-mysql-centos-8.webp


These instructions detail the upgrade from a previous version of MariaDB Community Server to MariaDB Community Server on CentOS Linux 8.
When MariaDB Community Server is upgraded, the old version needs to be uninstalled, and the new version needs to be installed.

1. Backup SQL

Code:
You must log in to view content
(1 lines)
With
  • root is sql user
  • dbname is database name
  • and enter password
2. Uninstall the Old Version
When upgrading to a new major release of MariaDB Community Server, it is necessary to remove the existing installation of MariaDB Community Server, before installing the new version of MariaDB Community Server. Otherwise, the package manager will refuse to install the new version of MariaDB Community Server.
Code:
You must log in to view content
(3 lines)

Before proceeding, verify that all MariaDB Community Server packages are uninstalled. The following command should not return any results:
Code:
You must log in to view content
(1 lines)

3. Install the New Version
Code:
You must log in to view content
(6 lines)

Install MariaDB Community Server and package dependencies:
Code:
You must log in to view content
(1 lines)

3. Configuration
MariaDB Community Server's packages bundle several configuration files:
  • /etc/my.cnf
  • /etc/my.cnf.d/client.cnf
  • /etc/my.cnf.d/mysql-clients.cnf
  • /etc/my.cnf.d/server.cnf
If your version of any of these configuration files contained any custom edits, then the package manager may save your edited version with the .rpmsave extension during the upgrade process. If you want to continue using your version with the custom edits, then you may need to move it back.

4. Starting the Server
MariaDB Community Server includes configuration to start, stop, restart, enable/disable on boot, and check the status of the Server using the operating system default process management system.
Code:
You must log in to view content
(2 lines)

5. Upgrading the Data Directory
MariaDB Community Server ships with the mariadb-upgrade utility which can be used to identify and correct compatibility issues in the new version. After you upgrade your Server and start the server process, run this utility to upgrade the data directory:
Code:
You must log in to view content
(1 lines)

Done!
 
Hướng dẫn nâng cấp phiên bản MariaDB Community Server trên CentOS Linux 8. Khi nâng cấp, phiên bản cũ cần được gỡ bỏ trước.

1. Sao lưu dữ liệu SQL

Code:
You must log in to view content
(1 lines)
Trong đó
  • root là sql user (mặc định là root)
  • dbname là tên cơ sở dữ liệu cần sao lưu
  • /root/backup.sql là nơi tập tin sao lưu.
  • sau đó nhập mật khẩu cho user sql
2. Gỡ Bỏ Phiên Bản Cũ
Bạn cần phải gỡ bỏ phiên bản cũ để cài phiên bản mới. An tâm dữ liệu sql sẽ không mất.
Code:
You must log in to view content
(3 lines)

Kiểm tra 1 lần nữa xem chắn chắn đã gỡ hết phiên bản cũ:
Code:
You must log in to view content
(1 lines)

3. Cài Đặt Phiên Bản Mới
Code:
You must log in to view content
(6 lines)

Cài đặt MariaDB Community Server:
Code:
You must log in to view content
(1 lines)

3. Cấu Hình Lại Các Tập Tin .cnf
Các tập tin cấu hình cơ bản:
  • /etc/my.cnf
  • /etc/my.cnf.d/client.cnf
  • /etc/my.cnf.d/mysql-clients.cnf
  • /etc/my.cnf.d/server.cnf
Sau khi cài đặt hoàn tất, các tập tin cấu hình cũ sẽ được thêm hậu tố .rpmsave, bạn cần sao chép lại các tập tin cấu hình cũ sang tập tin cấu hình mới (nếu cần). Sau đó bạn có thể xóa bỏ các tập tin .rpmsave.

4. Khởi Động Lại MariaDB:
Code:
You must log in to view content
(2 lines)

5. Nâng Cấp Dữ Liệu
Sau đó tiến hành nâng cấp các cơ sở dữ liệu để tránh lỗi.
Code:
You must log in to view content
(1 lines)

Hoàn tất.
 
Top