how to close a database in mysql code example Example: close mysql connection in php // OOP $conn->close(); //Procedural mysqli_close($conn);