public function runAsRoot()
	{
		if ($this->protectedMode)
		{
			return false;
		}

		if ($creds = $this->getRootCredentials())
		{
			$db = Driver::getInstance(
				array(
					'driver'   => (\Config::get('dbtype') == 'mysql') ? 'pdo' : \Config::get('dbtype'),
					'host'     => \Config::get('host'),
					'user'     => $creds['user'],
					'password' => $creds['password'],
					'database' => \Config::get('db'),
					'prefix'   => \Config::get('dbprefix')
				)
			);

			// Test the connection
			if (!$db->connected())
			{
				return false;
			}
			else
			{
				$this->db = $db;
				return true;
			}
		}

		return false;
	}
public function runAsRoot()
	{
		if ($this->protectedMode)
		{
			return false;
		}

		if ($creds = $this->getRootCredentials())
		{
			$db = Driver::getInstance(
				array(
					'driver'   => (\Config::get('dbtype') == 'mysql') ? 'pdo' : \Config::get('dbtype'),
					'host'     => \Config::get('host'),
					'user'     => $creds['user'],
					'password' => $creds['password'],
					'database' => \Config::get('db'),
					'prefix'   => \Config::get('dbprefix')
				)
			);

			// Test the connection
			if (!$db->connected())
			{
				return false;
			}
			else
			{
				$this->db = $db;
				return true;
			}
		}

		return false;
	}
public function runAsRoot ( ) { if ( $ this -> protectedMode ) { return false ; } if ( $ creds = $ this -> getRootCredentials ( ) ) { $ db = Driver :: getInstance ( array ( 'driver' => ( \ Config :: get ( 'dbtype' ) == 'mysql' ) ? 'pdo' : \ Config :: get ( 'dbtype' ) , 'host' => \ Config :: get ( 'host' ) , 'user' => $ creds [ 'user' ] , 'password' => $ creds [ 'password' ] , 'database' => \ Config :: get ( 'db' ) , 'prefix' => \ Config :: get ( 'dbprefix' ) ) ) ; // Test the connection if ( ! $ db -> connected ( ) ) { return false ; } else { $ this -> db = $ db ; return true ; } } return false ; }
Try to run commands as MySql root user

@return  bool  If successfully upgraded to root access
Try to run commands as MySql root user