answersLogoWhite

0

String startCommandScript[] = { "cmd.exe", "/c", "sc", "Start", "MySQL" };

Process process;

try {

process = new ProcessBuilder(commandScript).start();

InputStream is = process.getInputStream();

InputStreamReader isr = new InputStreamReader(is);

BufferedReader br = new BufferedReader(isr);

String line;

//System.out.printf("Output of running cmd /c dir is:");

while ((line = br.readLine()) != null) {

// if (line.matches("controlservice failed")) {

// System.out.println(".......");

// }

// System.out.println(line);

}

br.close();

isr.close();

is.close();

process.destroy();

} catch (IOException e) {

e.printStackTrace();

}

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

How do you check if the MySQL is running?

To check if MySQL is running, you can use the command line. On Linux, you can execute systemctl status mysql or service mysql status to see the service status. On Windows, you can check the Task Manager for the MySQL service or use the command sc query MySQL. Additionally, you can try connecting to the MySQL server using the MySQL client with mysql -u username -p to see if it accepts connections.


Does MySQL run on both Unix and Windows?

Yes. There are versions of MySQL for most Unix products, including Mac OS X, as well as Linux and Windows.


You have Linux server with PHP MySQL running on it can you shift entire setup on Windows since there are speed related issue on Linux server?

yes you can if you have the same php and mysql version on the windows machine just take a copy of the files and do a mysql db backup and move it. but if your haveing speed issues with Linux youll get worse on windows. yes you can if you have the same php and mysql version on the windows machine just take a copy of the files and do a mysql db backup and move it. but if your haveing speed issues with Linux youll get worse on windows.


Is MySQL open source?

Yes, MySQL is open source and is free to download and install. You can use the MySQL Installer to install and configure MySQL server on Windows operating system. It provides a simplified installation and configuration process for MySQL products running on Microsoft Windows. The list of MySQL products includes the following items: MySQL Server MySQL Workbench MySQL Router MySQL Shell MySQL for Visual Studio MySQL Reference Manuals PDF MySQL connectors (MySQL/Python connector, MySQL/NET connector, etc.) MySQL database examples. To get started with MySQL database easily, you can use the comprehensive solution provided by dbForge Studio for MySQL, which allows you to efficiently process data and automate the management of your database objects.


Where would one find a reference manual for a MYSQL Cluster?

If you are new to MYSQL you may find the quick guides very useful for this program. It is the worlds largest database program and a reference manual can be found at MySQL.


What database does the WAMP server refer to when it?

WAMP stands for Windows Apache Mysql PHP. Mysql is the default database in WAMP


What are Advantages of HTML Mysql?

MySQL can be linked with HTML easily by including JAR. We will need a Java program to establish an object too.


What database does the WAmmp server refer to when it's used with PHP?

WAMP is an abbreviation of "Windows, Apache, MySQL, and PHP", so it uses MySQL database server.


What has the author Jay Greenspan written?

Jay Greenspan has written: 'MySQL' 'MySQL weekend crash course' -- subject(s): MySQL (Electronic resource), SQL (Computer program language) 'Hunting Fish'


How do you connect to mysql using vb6?

Install the MyODBC database connector.Set up an new ODBC connection to your mysql database in Windows. (This will vary based on your version of Windows)You can use the ADODB extension in VB to connect to your ODBC connection.


What has the author Ronald Bradford written?

Ronald Bradford has written: 'Effective MySQL' -- subject(s): Relational databases, MySQL (Electronic resource), Database management 'Effective MySQL' -- subject(s): Relational databases, MySQL (Electronic resource), SQL (Computer program language)


How do you connect to an Access database using MySQL?

Have you tried out Navicat? Although I am not sure if it fulfills all your needs, it's my favorite MySql admin tool when I have to work on a windows machine.