redis - this command is not available unless the connection is created with admin-commands enabled -
when trying run following in redis using booksleeve.
using (var conn = new redisconnection(server, port, -1, password)) { var result = conn.server.flushdb(0); result.wait(); } i error saying:
this command not available unless connection created admin-commands enabled"
i not sure how execute commands admin? need create a/c in db admin access , login that?
basically, dangerous commands don't need in routine operations, can cause lots of problems if used inappropriately (i.e. equivalent of drop database in tsql, since example flushdb) protected "yes, meant that..." flag:
using (var conn = new redisconnection(server, port, -1, password, allowadmin: true)) <==== here i improve error message make clear , explicit.
Comments
Post a Comment