简体   繁体   中英

How to start mysql database when program starts?

I created a program C# windows form which connects to xampp mysql database, so before I started to run the Microsoft Visual Studio 2010 and run the program I setup first the xampp control panel to start the apache and mysql and after doing that my program will connect to the database. But now I already finished my program and I don't want to do all the setup again and again every time I launch my program. Is that possible programmatically?

Mysql and Apache should be installed as Windows services. These can be configured to start automatically with Windows, or you could start them by calling net start from your application. There may also be some classes in .Net that can handle service interaction, but I'm not familiar with them. Check MSDN to be sure, though.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM