Dear all

I have the following problem. I am trying to communicate with mysql through php but unsuccesfully. In the following script when i misspell the password it gives me the error message. but while it does not create the database it does not return any message. It seems that for some reason there is a communication problem between mysql and php. Some php function as mysql_create_db does not work. But why mysql_connect works?

<?php
$connect = mysql_connect("localhost", "root", "mysqlpass") or die ("Hey loser, check your server connection.");
mysql_create_db("mytest") or die(mysql_error());
?>

Many thanks
Cheers

Recommended Answers

All 3 Replies

Do you have create privalege on the database?

Hi,

i am using the root user. do i need to give privileges?

cheers

Does the database already exsist?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.