MariaDB 10.4.6 (GA)的變化和改進

一、支持對DROP COLUMN刪除字段採用ALGORITHM=INSTANT算法mysql

例:alter table t1 drop column name,ALGORITHM=INSTANT;算法

圖片1.png


MySQL 8.0.17版本不支持該算法sql

圖片2.png


二、支持更改字符集utf8->utf8mb4轉換採用ALGORITHM=INSTANT算法shell

例:alter table t1 change name name varchar(100) CHARSET utf8mb4,ALGORITHM=INSTANT;數據庫

圖片3.png


MySQL 8.0.17版本不支持該算法socket

圖片4.png


三、增長身份驗證插件 - Unix Socketide

unix_socket認證插件容許用戶經過本地Unix套接字文件鏈接到MariaDB的時候使用操做系統的憑證spa

 

用法:操作系統

1、建立數據庫帳號hechunyang插件

MariaDB [(none)]> GRANT ALL ON *.* TO 'hechunyang' IDENTIFIED VIA

unix_socket;

Query OK, 0 rows affected (0.001 sec)

 

2、建立操做系統帳號hechunyang

# useradd hechunyang

# passwd hechunyang

hechunyang用戶登陸操做系統

 

3、登陸MariaDB

[root@localhost ~]# su - hechunyang

Last login: Wed Jul 31 14:18:17 CST 2019 on pts/2

[hechunyang@localhost ~]$

[hechunyang@localhost ~]$ mysql -S /tmp/mysql3306.sock -uhechunyang

Welcome to the MariaDB monitor.  Commands end with ; or \g.

Your MariaDB connection id is 45

Server version: 10.4.6-MariaDB-log MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show databases;

+--------------------+

| Database           |

+--------------------+

| information_schema |

| test               |

+--------------------+

2 rows in set (0.001 sec)

 

在此示例中,用戶hechunyang已登陸操做系統並具備徹底shell訪問權限。他已經使用操做系統進行了身份驗證,而且他的MariaDB賬戶已配置爲使用unix_socket身份驗證插件,所以他無需再次對數據庫進行身份驗證。MariaDB接受他的操做系統憑證並容許他鏈接。


四、mysqladmin shutdown命令增長--wait-for-all-slaves參數,意思爲在關閉mysqld進程以前等待最後一個binlog事件發送到全部鏈接的Slave從庫.

例:MariaDB [(none)]> SHUTDOWN  WAIT  FOR  ALL  SLAVES;

Query OK, 0 rows affected (0.000 sec)

相關文章
相關標籤/搜索