MariaDB 10.4.6 (GA)的变化和改进

1、支持对DROP COLUMN删除字段采用ALGORITHM=INSTANT算法

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

图片1.png


MySQL 8.0.17版本不支持该算法

图片2.png


2、支持更改字符集utf8->utf8mb4转换采用ALGORITHM=INSTANT算法

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

图片3.png


MySQL 8.0.17版本不支持该算法

图片4.png


3、增加身份验证插件 - Unix Socket

unix_socket认证插件允许用户通过本地Unix套接字文件连接到MariaDB的时候使用操作系统的凭证

 

用法:

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接受他的操作系统凭证并允许他连接。


4、mysqladmin shutdown命令增加--wait-for-all-slaves参数,意思为在关闭mysqld进程之前等待最后一个binlog事件发送到所有连接的Slave从库.

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

Query OK, 0 rows affected (0.000 sec)




猜你喜欢

转载自blog.51cto.com/hcymysql/2432556