CREATE DATABASE DATABASENAME
MySQL is a database system , it is used to connect MySQl server.
MySQL It is free software to download and use it.
<?php $servername = "localhost"; $username = "root"; $password = ""; //server connection $connection = mysqli_connect($servername, $username, $password); if (!$connection) { die("Connection failed: " . mysqli_connect_error()); } $sqlQuery = "CREATE DATABASE sample"; if (mysqli_query($connection, $sqlQuery)) { echo "Database is created successfully!"; } else { echo "Error creating database: " . mysqli_error($connection); } // closing connection mysqli_close($connection); ?>
Create database using Mysql functions.