Check out example codes for "mysqli_connect parameters". It will help you in understanding the concepts better.

Code Example 1

mysqli_connect ( "host", "username", "password", "database_name" )

Code Example 2

<?php
$mysqli = new mysqli("localhost","my_user","my_password","my_db");

// Check connection
if ($mysqli -> connect_errno) {

  echo "Failed to connect to MySQL: " . $mysqli -> connect_error;
  
  exit();

  }
?>

Learn ReactJs, React Native from akashmittal.com