can't create databases
From: lawrence (lkrubner_at_geocities.com)
Date: 07/30/04
- Next message: CJ Llewellyn: "Re: Scrip for sending an eMail via PHP and Outlook"
- Previous message: Ben Cottrell: "Re: Function returns nothing (instead of flash)"
- Next in thread: David Mackenzie: "Re: can't create databases"
- Reply: David Mackenzie: "Re: can't create databases"
- Reply: Michael Austin: "Re: can't create databases"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Jul 2004 05:47:54 -0700
In the code below, the mysql_connect commands work correctly (though
I've changed the passwords here). I get the "We were able to
establish a connection" message. But then the code hangs and does
nothing. What am I doing wrong? The username and password are root, so
I should have the right permissions. The same username and password,
when I put them into phpMyAdmin, allow me to create databases without
a trouble.
$link = mysql_connect('localhost', 'u345', '2134');
if ($link) {
echo "<p>We were able to establish a connection to the
database.</p>";
} else {
die('Could not connect: ' . mysql_error());
}
$result = mysql_create_db($website);
if ($results) {
echo "The database '$website' was created.";
} else {
die("There was a problem. We were not able to create the database.
It is possisble that a database of the same name already existed, or
perhaps someone recently changed the configuration of the database
server. YOu might want to contact whoever is in charge of the database
and ask them what is up :". mysql_error());
}
- Next message: CJ Llewellyn: "Re: Scrip for sending an eMail via PHP and Outlook"
- Previous message: Ben Cottrell: "Re: Function returns nothing (instead of flash)"
- Next in thread: David Mackenzie: "Re: can't create databases"
- Reply: David Mackenzie: "Re: can't create databases"
- Reply: Michael Austin: "Re: can't create databases"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|