"egw_db::create_database gives no returnvalue, so we need to test the new db by connecting to it"

This commit is contained in:
Ralf Becker 2007-12-11 01:43:18 +00:00
parent f0e0d84e55
commit 573e27ad2e

View File

@ -154,8 +154,11 @@ class setup_cmd_database extends setup_cmd
}
catch (egw_exception_wrong_userinput $e) {
// db or user not working --> connect as root and create it
if (!$this->test_db->create_database($this->db_root,$this->db_root_pw,$this->db_charset))
{
try {
$this->test_db->create_database($this->db_root,$this->db_root_pw,$this->db_charset);
$this->connect();
}
catch(egw_exception_wrong_userinput $e) {
// try connect as root to check if that's the problem
$this->connect($this->db_root,$this->db_root_pw,$this->db_meta);
// if not give general error