1<?php
2$servername = "localhost";
3$username = "yourusername"; // For MYSQL the predifined username is root
4$password = "yourpassword"; // For MYSQL the predifined password is " "(blank)
5
6// Create connection
7$conn = new mysqli($servername, $username, $password);
8
9
10// Check connection
11
12 if ($conn->connect_error) {
13
14 die("Connection failed: " . $conn->connect_error);
15}
16
17echo "Connected successfully";
18
19?>