In order to ensure the database is functioning properly, thus it is important to connect them into a server. It requires appropriately named mysqli_connect() function. The first arguments will be sent to the function (hostname, username, password and database name) based on the users and privileges established within MySQL. By using PHP, a command line is scripted.