Install MySQL as window service

Dec 17, 2020    Janaki Mahapatra, Database

1. Open your command prompt. 2. Locate your mysql installed directory 3. Type the physical path up to mysql bin directory in commanfd prompt 4. and type  --install MySQL --defaults-file=C:\mysql\my.ini Example: C:\> C:\mysql\bin\mysqld --install MySQL --defaults-file=C:\mysql\my.ini This starts the service automatically with Windows bootup, and will load the my.ini configuration file which you have to place within the mysql directory. For the first time however, you will need to start the mysql service manually, since the earlier command makes mysql start and end with windows shutdowns and restarts. Finall type : net start mysql This will start the mysql service.