# Why close mysql database connection?

**URL:** <https://forum.kirupa.com/t/why-close-mysql-database-connection/316376>\
**Category:** Uncategorized\
**Created:** [November 19, 2010, 7:01pm UTC](https://forum.kirupa.com/t/why-close-mysql-database-connection/316376 "2010-11-19T19:01:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![spyderfx](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@spyderfx](https://forum.kirupa.com/u/spyderfx)\
**Post date:** [November 19, 2010, 7:01pm UTC](https://forum.kirupa.com/t/why-close-mysql-database-connection/316376/1 "2010-11-19T19:01:22Z")

</div>

When I read tutorials about using mysql, they always say to end the script by closing the database. Is there a reason for this? I assume it has something to do with security issues, but when I close the db it turns into a headache trying to figure out where I need to start the connection again (I’m new to this obviously).

I’ve searched for an answer to this online, but can’t find one.
