简体   繁体   English

HSQLDB 为加密数据库重置密码

[英]HSQLDB reset password for encrypted database

Is it possible to reset a password for an encrypted & embedded hsqldb database?是否可以为加密和嵌入式 hsqldb 数据库重置密码?

I can open it, establish the connection, but I want to remove the password, tried this我可以打开它,建立连接,但我想删除密码,试过这个

        db.update("SET password \"\"");
        db.update("ALTER USER SA SET password \"\"");
        db.update("ALTER USER SA SET password DIGEST \"\"");
        db.update("ALTER USER SA SET password NULL");

Nothing works.什么都行不通。 Is this even supported?这甚至支持吗?

PS.附注。

The encryption key is passed as加密密钥作为

;crypt_key="16def4bd3310e999f1a8d8d369986ab9";crypt_type=RC2; ;crypt_key="16def4bd3310e999f1a8d8d369986ab9";crypt_type=RC2;

in JDBC connection URL.在 JDBC 连接 URL 中。

It is supported.它是支持的。 The first two commands strings should work, but not the other two.前两个命令字符串应该有效,但其他两个无效。 The more "correct" form uses single quotes around the password string.更“正确”的形式在密码字符串周围使用单引号。

The problem may be with the db.update( part. This is not a JDBC statement and may not be doing what you expect. With an opened JDBC Connection, try:问题可能出在db.update(部分。这不是 JDBC 语句,可能没有按照您的预期运行。打开 JDBC 连接,请尝试:

Statement st = connection.createStatement();
st.execute("SET PASSWORD '' ");

Perhaps you want to remove the encryption, rather than the password.也许您想删除加密,而不是密码。 This is not possible directly, but you can use the PERFOR EXPORT ... statement, documented here http://hsqldb.org/doc/2.0/guide/management-chapt.html#N14EC1 for version 2.5.0 and later.这不是直接可能的,但您可以使用PERFOR EXPORT ...语句,此处记录在http://hsqldb.org/doc/2.0/guide/management-chapt.html#N14EC1 中,适用于 2.5.0 及更高版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM