How to find and print a mysql pid file in c++
I have gone through lots of websites about this topic, but I could not find any viable result relating to this.
If you can help me by giving some tips, then 开发者_如何学GoI will be greateful.
I have done this by querying MySQL to get the path to the PID file (SHOW VARIABLES LIKE pid_file) then:
FILE * f = fopen(path, "r");
fscanf(file, "%d", &pid);
fclose(file);
精彩评论