KyleMassacre Posted July 12, 2015 Share Posted July 12, 2015 Does anyone here use vagrant? The reason I ask is because I am looking for a decent box that comes with a LAMP stack. Now before people say why use LAMP, why not LEMP? Well, because it's vagrant and what I am working on is using Apache. My whole problem is that I am not good at all with Ruby, bash, .sh, etc and can't have too much configuring around otherwise I will break it and have to start over again much like I have been doing. I suck at starting up webhosts which is the bottom line here I have gone to PuPHPet and configured a nice little vagrant box there but I can't get MySQL connection settings to work no matter what I try. I can connect remotely using Sequal Pro and a ssh connection but I can't connect with my local site that is using codeigniter. I have no clue what I am doing wrong, he'll I can't even get it to connect with a hostname to get to the dev site like using my-site.dev I have to connect with the IP address haha. Any my help is greatly appreciated Quote Link to comment Share on other sites More sharing options...
Script47 Posted July 12, 2015 Share Posted July 12, 2015 I'm not sure if I completely understand you however you're are having connection issues with your code, so how're you connecting? What is your host? Do you need to specify a port? When I tried connecting to a server which was setup using Ubuntu I was using MySQL workbench where I would specify the port however in the code if i specified the port it wouldn't connect not sure why. I suggest you speak with Nick in WsIRC. Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted July 12, 2015 Author Share Posted July 12, 2015 Well I guess vagrant is set up to connect through ssh which has a username and password plus the username and password for the MySQL server. The port isn't the issue because I can set any port to point 3306. I honestly don't know what the issue is Quote Link to comment Share on other sites More sharing options...
Script47 Posted July 13, 2015 Share Posted July 13, 2015 What are you using to connect to the db? If you haven't done already try the db (MySQL) connection but for host name try localhost if you haven't done so already. Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted July 13, 2015 Author Share Posted July 13, 2015 I am using Codeigniter's db class and I have tried almost every combo imaginable to connect. I have tried: localhost with the following: username: root password: root username: vagrant password: vagrant 127.0.0.1 username: root password: root username: vagrant password: vagrant private ip username: root password: root username: vagrant password: vagrant I can connect remotely using: 127.0.0.1 ssh user: vagrant ssh pass: vagrant mysql user: root mysql pass: root Quote Link to comment Share on other sites More sharing options...
Dayo Posted July 13, 2015 Share Posted July 13, 2015 so you want to access your MySQL server remotely from a different machine? if so there are two options. 1) You can open a ssh tunnel from you local PC to the remote server to forward the mysql port (usualy 3306) 2) You can edit the my.cnf file and edit the bind address from 127.0.0.1 to 0.0.0.0 then alter the MySQL user privileges to allow connections from any host (% i think) Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted July 13, 2015 Author Share Posted July 13, 2015 I can access it remotely with no issues. My problem is that my web application can't connect to th database Quote Link to comment Share on other sites More sharing options...
Dayo Posted July 13, 2015 Share Posted July 13, 2015 Is the web application that you are accessing the database from on the same server as the MySQL database? Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted July 13, 2015 Author Share Posted July 13, 2015 Yeah exactly. Maybe I will try again when I get home from work Quote Link to comment Share on other sites More sharing options...
Dayo Posted July 13, 2015 Share Posted July 13, 2015 http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html this article better explains what I said earlier Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.