How do I connected MySql WorkBench to an AWS EC2 running Ubuntu and MySQL!!
HTML-код
- Опубликовано: 1 сен 2022
- This is the way I was able to connect MySql WorkBench to an AWS EC2 running Ubuntu and MySQL.
If you have another way good for you, If you have something to contribute, welcome.
Steps:
1. Using your EC2 Management console, log into your MySQL Server.
2. Create a User using: CREATE USER 'theuser'@'%' IDENTIFIED WITH mysql_native_password BY 'thepassword';
3. Grant Privileges to the new user: GRANT ALL ON . to 'theuser'@'%'; then run FLUSH PRIVILEGES; and exit.
4. cd /etc/mysql/mysql.conf.d
5. sudo nano mysqld.cnf
6. edit bind-address = 0.0.0.0
7. Save the file, restart mysql service
8. En Your AWS console find the Security Groups of your instance and add a Rule to let inbound to the port 3306.
9. Copy your EC2 instance IPv4, open WorkBench, create a new connection, put in Hostname EC2 IPv4, Username = MySQL Username you created before, write the password then Test Connection. It worked for me.
Good Luck.
Amazing kudos to your efforts!
Excellent Job. i was searching for this topic and not a single video has explained this. Appreciated your work.
Really a great explanation about this specific and difficult topic
excelent
Mr. Thanks for share. Helped me a lot....Great....
Thank bro it really helpfull for me
Thanks a lot
Perfact