Vagrant MySQL Access

China☆狼群 提交于 2019-12-12 02:25:17

问题


So I am new to this vagrant vm creation (and am really liking it). I am using puphpet to make the config. Everything is working great. Access to the shared folders, ssh and access to the website (Apache server).

The last piece I cannot seem to get figured out is the database part. When using php I can connect but to do the actual development on my database I prefer to use sqldeveloper (I have tried workbench). No matter what I enter I cannot seem to get a connection. No matter the user ip or name it does not go anywhere.

I have tried 127.0.0.1 and 192.168.56.100 <= VM ip

Port is 3306 (as far as I know) I did not modify this as far as I know.

I am not sure what information would be helpful here so please let me know.

I have seen something about updating the my.cnf, binding addresses and updating user privileges but that was argued in a couple other articles I have seen.

Just want to check because I am also making the documentation that will be used for setup.

If the above steps are needed is there anyway to automate it?


回答1:


You have to forward the port in Puphpet you had to do this so that your server can talk to port 80. You must do the same for anything else you do. So for you to access 3306 you need to have it foward inside the config. You can open up the existing config with any editors.



来源:https://stackoverflow.com/questions/22750174/vagrant-mysql-access

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!