php/mysql communication problem

Reply

Join Date: Jul 2006
Posts: 6
Reputation: tzan2833 is an unknown quantity at this point 
Solved Threads: 0
tzan2833 tzan2833 is offline Offline
Newbie Poster

php/mysql communication problem

 
0
  #1
Jul 27th, 2006
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
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 494
Reputation: Puckdropper is an unknown quantity at this point 
Solved Threads: 21
Puckdropper Puckdropper is offline Offline
Posting Pro in Training

Re: php/mysql communication problem

 
0
  #2
Jul 27th, 2006
Do you have create privalege on the database?
www.uncreativelabs.net

Old computers are getting to be a lost art. Here at Uncreative Labs, we still enjoy using the old computers. Sometimes we want to see how far a particular system can go, other times we use a stock system to remind ourselves of what we once had.
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 6
Reputation: tzan2833 is an unknown quantity at this point 
Solved Threads: 0
tzan2833 tzan2833 is offline Offline
Newbie Poster

Re: php/mysql communication problem

 
0
  #3
Jul 28th, 2006
Hi,

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

cheers
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 32
Reputation: BlazingWolf is an unknown quantity at this point 
Solved Threads: 1
BlazingWolf BlazingWolf is offline Offline
Light Poster

Re: php/mysql communication problem

 
0
  #4
Jul 29th, 2006
Does the database already exsist?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC