【问题标题】:MariaDB 10.1 require ssl not validMariaDB 10.1 要求 ssl 无效
【发布时间】:2017-04-11 11:37:16
【问题描述】:

尝试在 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 |
+---------------------+---------------------------------+

【问题讨论】:

    标签: mysql ssl openssl mariadb


    【解决方案1】:

    CREATE USER 语法涉及更多。 SSL 是一条红鲱鱼。 foo 是不够的,正如这里指出的那样:

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

    【讨论】:

      【解决方案2】:

      在 mariadb 中,SSL 是保留字。

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

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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2016-02-22
        • 2020-02-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-02-21
        • 2022-09-27
        相关资源
        最近更新 更多