We're forwarding the MySQL port 3306 in our vagrant environment, but there's additional MySQL config that needs to be done before you can connect through it on the host machine.
During vagrant install we need to append this to /etc/mysql/my.cnf
[mysqld]
bind-address = 0.0.0.0
Then feed this to mysql:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'islandora';
FLUSH PRIVILEGES;
A sudo service mysql restart probably wouldn't hurt either.
You've successfully completed this issue when you can connect to mysql from your host environment as if it were running locally instead of in the vagrant environment.
@dannylamb @ruebot I can take a crack at this. I will need some guidance on updating vagrant. Once I'm done I should be able to do the other vagrant upgrade tickets.
@jyobb Sounds great. The easiest place to do this is probably at the end of https://github.com/Islandora-CLAW/claw_vagrant/blob/master/scripts/lamp-server.sh
Should be fairly straightforward to append that entry into my.cnf and then pass those privileges commands to mysql using the -e option.
If you comment out these lines https://github.com/Islandora-CLAW/claw_vagrant/blob/master/Vagrantfile#L47-L58 in the vagrantfile, when you vagrant up it will only run the bootstrapping and lamp stack scripts so you can test much more quickly.
FYI, the commad to verify that this works is mysql -h 127.0.0.1 -u root -p from the command line of the host machine. Without the explicit -h, it doesn't seem to work. It defaults to localhost, which for whatever reason it cannot resolve.
There's no place like 127.0.0.1....
I have it working and am just doing a bit of testing now. I'll issue a
pull request sometime tomorrow.
John
On Wed, Mar 29, 2017 at 2:05 PM, dannylamb notifications@github.com wrote:
FYI, the commad to verify that this works is mysql -h 127.0.0.1 -u root -p
from the command line of the host machine. Without the explicit -h, it
doesn't seem to work. It defaults to localhost, which for whatever reason
it cannot resolve.There's no place like 127.0.0.1....
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/Islandora-CLAW/CLAW/issues/568#issuecomment-290209160,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACqS9qcPGwWJ3qARdmL2Yxf6TgCLFnHGks5rqrlzgaJpZM4Mmvtm
.