DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   PHP (http://www.daniweb.com/forums/forum17.html)
-   -   php/mysql communication problem (http://www.daniweb.com/forums/thread51129.html)

tzan2833 Jul 27th, 2006 10:17 am
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

Puckdropper Jul 27th, 2006 10:54 am
Re: php/mysql communication problem
 
Do you have create privalege on the database?

tzan2833 Jul 28th, 2006 6:50 am
Re: php/mysql communication problem
 
Hi,

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

cheers

BlazingWolf Jul 29th, 2006 2:48 am
Re: php/mysql communication problem
 
Does the database already exsist?


All times are GMT -4. The time now is 5:02 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC