vibhasbhingarde
1/24/2017 - 9:53 AM

create user in mysql to access from remote location

create user in mysql to access from remote location

Locate my.cnf file and search for 
bind-address and replace it with 0.0.0.0

CREATE USER 'myuser'@'localhost' IDENTIFIED BY 'mypass';
CREATE USER 'myuser'@'%' IDENTIFIED BY 'mypass';

GRANT ALL ON *.* TO 'myuser'@'localhost';
GRANT ALL ON *.* TO 'myuser'@'%';


--- NEW --- 

CREATE USER 'dmtuser'@'%' IDENTIFIED BY 'dmtu$er';

GRANT ALL PRIVILEGES ON DomesticMoneyTransfer . * TO 'dmtuser'@'%' WITH GRANT OPTION;

FLUSH PRIVILEGES;