create user ‘nextcloud’@’localhost’ identified by ‘xxx’;

create database nextcloud;

grant all privileges on nextcloud.* to ‘nextcloud’@’localhost’ identified by ‘xxx’;

FLUSH PRIVILEGES;

By karlo