mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 07:09:20 +01:00
added what i think is working code to create the pgsql database
This commit is contained in:
parent
777aa59e10
commit
45eda7f54e
@ -331,12 +331,15 @@ class db {
|
||||
{
|
||||
$this->User = $adminname;
|
||||
$this->Password = $adminpasswd;
|
||||
$this->Database = "mysql";
|
||||
}
|
||||
$this->disconnect();
|
||||
$this->query("CREATE DATABASE $currentDatabase");
|
||||
$this->query("grant all on $currentDatabase.* to $currentUser@localhost identified by '$currentPassword'");
|
||||
$this->disconnect();
|
||||
|
||||
system("createdb -h ".$this->Host." ". $currentDatabase, $outval);
|
||||
if($outval != 0)
|
||||
{
|
||||
/* either the rights r not available or the postmaster is not running .... */
|
||||
echo 'database creation faliure <BR>';
|
||||
echo 'please setup the postreSQL database manually<BR>';
|
||||
}
|
||||
|
||||
$this->User = $currentUser;
|
||||
$this->Password = $currentPassword;
|
||||
|
Loading…
Reference in New Issue
Block a user