$queryList = array("mysql -u {$user} --password='******' -e 'DROP DATABASE IF EXISTS {$database} '", "mysql -u {$user} --password='******' -e 'CREATE DATABASE {$database}'", "mysql -u {$user} --password='******' {$database} < " . __DIR__ . "/../install/mysql.sql"); foreach ($queryList as $exec_command) { exec($exec_command, $output, $return_var); if ($return_var) { throw new \Exception("[!] Mysql exec error : {$exec_command} \n Error : \n " . print_r($output, true)); } } echo "*** In progress: mysql.sql imported\n"; global $db; global $cuid; global $variables; global $err; global $mem; global $admin; global $mysql; global $ftp; global $quota; global $db; $db = new \DB_system($user, $database, $password); $db->connect(); $cuid = 0; $variables = new \m_variables(); $mem = new \m_mem(); $err = new \m_err(); $authip = new \m_authip(); $hooks = new \m_hooks(); $bro = new \m_bro(); $admin = new \m_admin(); $mysql = new \m_mysql(); $ftp = new \m_ftp(); $quota = new \m_quota();