简体   繁体   中英

Start mysql and apache from cmd

I installed xampp and now I want start apache and mysql from command line and also I won't install services. I use some command and it's worked but after start mysql (for example) cmd is open, I want close but after close cmd mysql stopped.

You can't. Either you run it from the command line, having to keep the shell open, or you run it as a service after which you can close cmd (if you used cmd at all).

I would choose the latter, and I can't understand why you won't install it as a service.

If you are using XAMPP, you can start your servers by doing:

sudo /opt/lampp/lampp start

Otherwise, you can start your servers with this one:

sudo service apache2 start && sudo service mysql start

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