0

How to create database

I am newbie in php how to create database

22nd Jan 2017, 9:36 AM
ക്രൂരൻ വാപ് മാസ്റ്റർ
ക്രൂരൻ വാപ് മാസ്റ്റർ - avatar
4 Answers
0
Anyone
22nd Jan 2017, 9:43 AM
ക്രൂരൻ വാപ് മാസ്റ്റർ
ക്രൂരൻ വാപ് മാസ്റ്റർ - avatar
0
you can't create database from PHP but you can create it through many ways : 1 - From application that deals with your sql server such as phpMyAdmin, or Mysql-Workbench . 2 - from terminal just access you sql server and type "CREATE DATABSE <your DB name>".
22nd Jan 2017, 11:01 AM
abdullah shallal
abdullah shallal - avatar
0
Try this localhost/phpmyadmin
24th Jan 2017, 1:56 PM
Shubham Surya
Shubham Surya - avatar
0
$dbhost = 'localhost:3036'; $dbuser = 'root'; $dbpass = 'rootpassword'; $conn = mysql_connect($dbhost, $dbuser, $dbpass); if(! $conn ) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully'; $sql = 'CREATE Database test_db'; $retval = mysql_query( $sql, $conn ); if(! $retval ) { die('Could not create database: ' . mysql_error()); } echo "Database test_db created successfully\n"; mysql_close($conn);
25th Jan 2017, 9:36 PM
HamidReza GHolami
HamidReza GHolami - avatar