954,132 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

php/mysql communication problem

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

tzan2833
Newbie Poster
6 posts since Jul 2006
Reputation Points: 10
Solved Threads: 0
 

Do you have create privalege on the database?

Puckdropper
Posting Pro
500 posts since Jul 2004
Reputation Points: 23
Solved Threads: 23
 

Hi,

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

cheers

tzan2833
Newbie Poster
6 posts since Jul 2006
Reputation Points: 10
Solved Threads: 0
 

Does the database already exsist?

BlazingWolf
Light Poster
32 posts since Feb 2006
Reputation Points: 10
Solved Threads: 1
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You