What happens when you restart MySQL (WAMP’s database service)?

Risks of Restarting Every 3 Hours

Safer Alternatives

  1. Only restart if the service fails

    • Instead of restarting every 3 hours, configure Task Scheduler to start the service if it’s stopped (health check).

    Example batch

    sc query wampmysqld64 | find "RUNNING" >nul
    if %errorlevel%==1 net start wampmysqld64
    sc query wampapache64 | find "RUNNING" >nul
    if %errorlevel%==1 net start wampapache64
    

    This way it only starts services if they’re not running.

  2. Schedule a restart during off-peak hours

    • e.g. once daily at 3 AM, when traffic is minimal.

  3. Use MySQL config for stability

    • Instead of forced restarts, tune MySQL memory, query cache, etc., so it doesn’t need frequent restarting.

Answer to your question