0
votes
  1. I am using MySql Version 5.7.17 with centos-7 on AWS EC2 Instance(Server1)
  2. I have added entry "bind-address=0.0.0.0" in "/etc/my.cnf"
  3. Added inbound rule in security group for port 3306 with 0.0.0.0/0
  4. Added new user and assigned all privileges with following queries
  5. GRANT ALL PRIVILEGES ON . TO bob@'%' identified by 'password';
  6. FLUSH PRIVILEGES;
  7. Another EC2 instance(Server2) is on same VPC.

Still,I am not able to connect MySQL database from remote server(Server2) to server(Server1).

1
what's the error you getting? - GorvGoyl
also, try with root user in server B - GorvGoyl
Already tried with all the users.And error is "Permission denied" - Dinesh Belakare
What is the exact error message you get when trying to connect? - Mark B

1 Answers

0
votes

Remote db connection is working now.

I run following command on remote server(Server2)

setsebool -P httpd_can_network_connect_db=1