How to Install MySQL Service on Windows – XAMPP

If you are a web developer that work a lot with PHP and MySQL, surely you need to turn on and turn off the apache and MySQL server manually, eg: every time you start your windows, seems uncomfortable, right?  It would be nice if the server automatically starts when we start our windows, so here we’ll discuss how to install MySQL service on windows especially using XAMPP, if you prefer to use a command prompt, please refer to this tutorial: Install, Start, Stop, and Uninstall MySQL Service on Windows Using Command Promt

Install MySQL Service on Windows

Before we start to install MySQL service on Windows, there are a few things that need to note:

  1. First: In order to be able to install the service, make sure that you have installed the FULL Version of xampp, NOT the portable version nor the full version that packaged as an archive file (.7z or .zip), please refer to this article to determine any type of XAMPP package file.
  2. Second, you have to run XAMPP Control Panel as Administrator: it can be achieved through START > ALL PROGRAMS > XAMPP > XAMPP Control Panel, right click on XAMPP Control Panel and choose Run As Administrator

    Running XAMPP as Administrator

    Alternatively, you want to go to XAMPP installation directory, then right click on the xampp-control.exe file and click on Run As Administrator.

    Running xampp-control.exe as Administrator

1. Install MySQL service using XAMPP

To install MySQL service using XAMPP, in the XAMPP Control Panel windows, simply check the MySQL service button that located on the left side of MySQL components, next, you will be noticed by a small message window “Click Yes to Install the MySQK Service”, click Yes to continue.

Install MySQL Service on Windows Using XAMPP

If successful, it will display a green checkmark.

2. Running MySQL Service

MySQL service that we have installed is not running automatically, we have to run it manually, instead. To do so, simply click on the START button located on the right side of MySQL component.

Running Apache Service on Windows Using XAMPP

If no errors occurred, the MySQL service will run and MySQL component will have a green background,  now, every time you start your windows, MySQL service will also start.

3. Uninstall apache service using XAMPP

If you change your mind and want to remove / uninstall MySQL service, simply uncheck the install service button, but first, you need to make sure that the MySQL service is stopped, otherwise, it will trigger an error.

Uninstall MySQL Service on Windows Using XAMPP

Addition Note

So far, you only see the changes on the control panel, but maybe do not know what is happens to your system. Windows provide a tool to manage services named Services.msc file, through this tool you can monitor all of the changes (install, run, and uninstall). To use this tool, go to windows start menu then type services, next, click on the services.msc file, in addition, you can also open the Service.msc file through Windows Control Panel by navigating to: Start » Control Panel » System and Security » Administrative Tools.

Tools For Monitoring Services

Startup Type Automatic means that the service will be started along with windows start.

If you want to work with command prompt, you can read this article: Install, Start, Stop, and Uninstall MySQL Service on Windows

3 Responses

Leave a comment

Like Us

Social