Start or stop mysql database using java programming

前端 未结 2 760
野趣味
野趣味 2020-12-11 11:07

I am having multiple mysql databases running on multiple servers.In hsql database we can start the server or stop the server using java programming.I am going to use any dat

2条回答
  •  情深已故
    2020-12-11 11:12

    Try this in windows machine:

    START

    Process process = Runtime.getRuntime().exec("net START MySQL");
    

    STOP

    Process process = Runtime.getRuntime().exec("net STOP MySQL");
    

提交回复
热议问题