Databases & DBA  

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

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

  • Active connections are dropped → any application connected to MySQL will lose its session.

  • Running queries/transactions are aborted → if a query was in the middle of writing, MySQL will roll back that transaction (thanks to transaction logs in InnoDB).

  • Tables/data themselves are safe → MySQL ensures durability, so committed data is not lost.

  • Non-transactional tables (MyISAM) are riskier → if you still have MyISAM tables, they can become corrupted if a write was in progress when the service stopped.

Risks of Restarting Every 3 Hours

  • Apps/websites using the DB may fail while the service is down.

  • Any batch jobs, cron jobs, or API calls during restart will error out.

  • If you restart during heavy writes, performance may be affected briefly.

  • Tables themselves won’t get corrupted in InnoDB, but MyISAM tables can.