Login to AWS Management Console. Under the security group, add inbound rule for MySQL.
First login to EC2 instance using SSH, then login to mysql
Now open the my.cnf file from /etc/mysql and search for bind-address, the default value will be
First login to EC2 instance using SSH, then login to mysql
mysql -hlocalhost -uroot -pprovide the password. Once you are in mysql prompt
CREATE USER 'testuser'@'%' IDENTIFIED BY 'testpwd'
GRANT ALL PRIVILEGES ON *.* TO 'testuser'@'%' WITH GRANT OPTION
FLUSH PRIVILEGESNote: Setting host to '%' may be harmful, you can set your IP address to access the MySQL from your IP address only
Now open the my.cnf file from /etc/mysql and search for bind-address, the default value will be
bind-address = 127.0.0.1change it to
bind-address = 0.0.0.0That's it now go to MySQL workbench, create connection with
Host:
Username: testuser
Comments
Post a Comment
Want to tell something about this post. Please feel free to write...