Showing posts with label Mysql Create Database. Show all posts
Showing posts with label Mysql Create Database. Show all posts

Wednesday, 24 October 2018

Create a MySQL database

SQL command used to create to create a db.

To create a database called ‘financial’ use the following SQL command:
create database financial
The command can be issued from any SQL source including an application with database connectivity (i.e., PHP, Java, etc.) or directly from mysql command (see Connect to a MySQL server using the mysql command for more information).

Friday, 5 June 2015

Mysql: Create a database

<?php
$db = "newdb";
//connect to server with username and password
$connection = @mysql_connect ("localhost","root", "") or die (mysql_error());
//connect to database
$result = @mysql_create_db($db, $connection) or die(mysql_error());
if ($result) {
echo"<P>Database has been created!</P>";
}
?>