src/MysqlProxy.php
public function processAuth(string $pluginName)
    {
        switch ($pluginName) {
            case 'mysql_native_password':
                $password = SecurityUtil::scramble411($this->account['password'], $this->salt);
                break;
            case 'caching_sha2_password':
                $password = SecurityUtil::scrambleSha256($this->account['password'], $this->salt);
                break;
            case 'sha256_password':
                throw new MySQLException('Sha256_password plugin is not supported yet');
                break;
            case 'mysql_old_password':
                throw new MySQLException('mysql_old_password plugin is not supported yet');
                break;
            case 'mysql_clear_password':
                $password = array_merge(getBytes($this->account['password']), [0]);
                break;
            default:
                $password = SecurityUtil::scramble411($this->account['password'], $this->salt);
                break;
        }
        return $password;
    }
public function processAuth(string $pluginName)
    {
        switch ($pluginName) {
            case 'mysql_native_password':
                $password = SecurityUtil::scramble411($this->account['password'], $this->salt);
                break;
            case 'caching_sha2_password':
                $password = SecurityUtil::scrambleSha256($this->account['password'], $this->salt);
                break;
            case 'sha256_password':
                throw new MySQLException('Sha256_password plugin is not supported yet');
                break;
            case 'mysql_old_password':
                throw new MySQLException('mysql_old_password plugin is not supported yet');
                break;
            case 'mysql_clear_password':
                $password = array_merge(getBytes($this->account['password']), [0]);
                break;
            default:
                $password = SecurityUtil::scramble411($this->account['password'], $this->salt);
                break;
        }
        return $password;
    }
认证

@param string $pluginName

@return array
@throws MySQLException