0
votes

I created Virtual Machine on Virtual Box by using vagrant with puppet configurations. In vm, i can connect to mysql db however I want to connect VM's mysql from my local machine.

Firstly, I tried to change "bind-adress" value in my.cnf then restarted mysql service however it didn't work. I think i could not change bind-address as it should be. When i run "mysql --help" command bind-address's value is "No Default Value".

VM properties:

  • Ubuntu 14.04
  • mysql 5.6
  • forwarded_port ( host:7104 -> guest:22 )

Part of the "mysql --help" command enter image description here

Part of the "my.cnf" is
enter image description here

P.S. => After i changed /etc/mysql/my.cnf file, i restarted mysql service

Please help :)

1

1 Answers

0
votes

Step1: comment bind address entry in your cnf file.

step2: restart mysql service.

step3: stop iptables service if you are not using any other purpose-

service iptables stop

Step4: grant permission to one user, which will connect your db remotely.

grant all privileges on *.* to user1@'%' identified by 'user1';

Here to test I have provided all rights globally, you can prepare grant statement as per your requirement.