src/Actions/ManagesMysqlUsers.php
public function createMysqlUser($serverId, array $data, $wait = true)
    {
        $user = $this->post("servers/$serverId/mysql-users", $data)['user'];

        if ($wait) {
            return $this->retry($this->getTimeout(), function () use ($serverId, $user) {
                $user = $this->mysqlUser($serverId, $user['id']);

                return $user->status == 'installed' ? $user : null;
            });
        }

        return new MysqlUser($user + ['server_id' => $serverId], $this);
    }
public function createMysqlUser($serverId, array $data, $wait = true)
    {
        $user = $this->post("servers/$serverId/mysql-users", $data)['user'];

        if ($wait) {
            return $this->retry($this->getTimeout(), function () use ($serverId, $user) {
                $user = $this->mysqlUser($serverId, $user['id']);

                return $user->status == 'installed' ? $user : null;
            });
        }

        return new MysqlUser($user + ['server_id' => $serverId], $this);
    }
public function createMysqlUser ( $ serverId , array $ data , $ wait = true ) { $ user = $ this -> post ( "servers/$serverId/mysql-users" , $ data ) [ 'user' ] ; if ( $ wait ) { return $ this -> retry ( $ this -> getTimeout ( ) , function ( ) use ( $ serverId , $ user ) { $ user = $ this -> mysqlUser ( $ serverId , $ user [ 'id' ] ) ; return $ user -> status == 'installed' ? $ user : null ; } ) ; } return new MysqlUser ( $ user + [ 'server_id' => $ serverId ] , $ this ) ; }
Create a new MySQL User.

@param  integer $serverId
@param  array $data
@param  boolean $wait
@return MysqlUser
Create a new MySQL User .