943,906 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 2804
  • PHP RSS
Jul 27th, 2006
0

php/mysql communication problem

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
tzan2833 is offline Offline
6 posts
since Jul 2006
Jul 27th, 2006
0

Re: php/mysql communication problem

Do you have create privalege on the database?
Reputation Points: 23
Solved Threads: 23
Posting Pro in Training
Puckdropper is offline Offline
494 posts
since Jul 2004
Jul 28th, 2006
0

Re: php/mysql communication problem

Hi,

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

cheers
Reputation Points: 10
Solved Threads: 0
Newbie Poster
tzan2833 is offline Offline
6 posts
since Jul 2006
Jul 29th, 2006
0

Re: php/mysql communication problem

Does the database already exsist?
Reputation Points: 10
Solved Threads: 1
Light Poster
BlazingWolf is offline Offline
32 posts
since Feb 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Same problem
Next Thread in PHP Forum Timeline: Return Functions/Methods in a class





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC