| 43 | } |
| 44 | |
| 45 | string MySqlStringHelper::GetCreateUserStr(const string &username, const string &pwd) { |
| 46 | char cmd[1024]; |
| 47 | if(pwd.empty()) { |
| 48 | sprintf(cmd, "create user %s;", username.c_str()); |
| 49 | } |
| 50 | else { |
| 51 | sprintf(cmd, "create user %s@'127.0.0.1' identified by '%s';", username.c_str(), pwd.c_str()); |
| 52 | } |
| 53 | return cmd; |
| 54 | } |
| 55 | |
| 56 | string MySqlStringHelper::GetRevokeAdminUserStr(const string &admin_username, const string &admin_pwd, |
| 57 | const string &svr_ip) { |
nothing calls this directly
no outgoing calls
no test coverage detected