MariaDB 10.1要求ssl无效

时间:2017-04-11 11:37:17

标签: mysql ssl openssl mariadb

尝试在centos7服务器上添加MariaDB 10.1.22中的用户,我收到sql语法错误。

MariaDB [(none)]> create user foo identified by 'password' require SSL;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'require SSL' at line 1
MariaDB [(none)]> show variables like '%ssl%';
+---------------------+---------------------------------+
| Variable_name       | Value                           |
+---------------------+---------------------------------+
| have_openssl        | YES                             |
| have_ssl            | DISABLED                        |
| ssl_ca              | /etc/pki/tls/private/ca.csr     |
| ssl_capath          |                                 |
| ssl_cert            | /etc/pki/tls/certs/ca.crt       |
| ssl_cipher          |                                 |
| ssl_crl             |                                 |
| ssl_crlpath         |                                 |
| ssl_key             | /etc/pki/tls/private/ca.key     |
| version_ssl_library | OpenSSL 1.0.1e-fips 11 Feb 2013 |
+---------------------+---------------------------------+

2 个答案:

答案 0 :(得分:0)

CREATE USER语法更复杂。 SSL是一个红鲱鱼。 li span { position: relative; transition: top .5s 0.5s; //this has a 0.5s delay top: -0vh; } 是不够的,正如这里指出的那样:

https://dev.mysql.com/doc/refman/5.7/en/account-names.html

答案 1 :(得分:0)

在mariadb中,SSL是保留字。

https://mariadb.com/kb/en/library/reserved-words/

虽然,我还不知道为了什么。