416 B
416 B
mariadb
CREATE USER 'newuser'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON db.* TO 'newuser'@'%';
FLUSH PRIVILEGES;
REVOKE type_of_permission ON database_name.table_name FROM 'username'@'localhost';
postgres
create database mydb;
create user myuser with encrypted password 'mypass';
grant all privileges on database mydb to myuser;
alter database mydb owner to myuser;