Create User with Database and grant remote rights


title: “Create User with Database and grant remote rights”
date: 2020-01-26T11:41:46
slug: create-user-with-database-and-grant-remote-rights


create database mqtt;

# Allow general Connection to DB
CREATE USER 'mqtt'@'localhost' IDENTIFIED BY 'mqtt';
CREATE USER 'mqtt'@'%' IDENTIFIED BY 'mqtt';

# Allow Connection to DB mqtt
GRANT ALL ON mqtt.\* TO 'mqtt'@'localhost';
GRANT ALL ON mqtt.\* TO 'mqtt'@'%';
Print Friendly, PDF & Email