<?php
$dbhost = 'localhost:1080';
$dbuser = 'username'; // in local root is default username
$dbpass = 'password';
$con = mysql_connect($dbhost, $dbuser, $dbpass);
if(! $con )
{
die('connection error : ' . mysql_error());
}
echo 'Connected successfully';
$sql = 'CREATE Database test_database';
$query= mysql_query( $sql, $conn );
if(! $query )
{
die('Not create database: ' . mysql_error());
}
echo "Database created successfully\n";
mysql_close($conn);
?>
No comments:
Post a Comment