access mysql from remote

Solutions on MaxInterview for access mysql from remote by the best coders in the world

showing results for - "access mysql from remote"
Marceau
26 May 2020
1mysql> CREATE USER 'monty'@'localhost' IDENTIFIED BY 'some_pass';
2mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost'
3    ->     WITH GRANT OPTION;
4mysql> CREATE USER 'monty'@'%' IDENTIFIED BY 'some_pass';
5mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%'
6    ->     WITH GRANT OPTION;
7
8
9#you need to change ufw for allowing 3306 port.
10
11sudo ufw allow 3306
12
13#if you are in aws ec2, you have to change the security group also