fix bug and update MySQL tutorial

This commit is contained in:
XieHan
2021-06-03 00:30:55 +08:00
parent 37d6cb4d86
commit a788401b3c
2 changed files with 5 additions and 2 deletions

View File

@@ -244,8 +244,11 @@ int main(int argc, char *argv[])
signal(SIGTERM, sighandler);
std::string url = argv[1];
if (strncasecmp(argv[1], "mysql://", 8) != 0)
if (strncasecmp(argv[1], "mysql://", 8) != 0 &&
strncasecmp(argv[1], "mysqls://", 9) != 0)
{
url = "mysql://" + url;
}
const char *query = "show databases";
stop_flag = false;