Contents
We really like Vagrant for the following reasons:
- Instant setup for developers
- Isolate painful setup projects/projects with many dependancies
- Switch between machines effortlessly (with Vagrant running on a publicly accessible host machine)
- project isolation
= Blog Entries and such on Vagrant =
DC Ruby talk about Vagrant, in blog form
Setting up MySQL on a Vagrant box
Setting up my.cnf locations
mysql looks like:
/etc/my.cnf
/usr/local/mysql/etc/my.cnf
~/.my.cnf
Setting up MySQL 5.5
This is how I got MySQL 5.5 up. It's probably not very kosher, but...
- Download from site
- cd /usr/local/mysql
- tar (wherever you put mysql)
- rm /etc/mysql/my.conf
- cp /usr/local/mysql/support-files/my-medium.cnf /usr/local/mysql/etc/my.cnf
- Add user=vagrant line to /usr/local/mysql/etc/my.cnf. (This is because of the next step...)
Add a shared folder for /usr/local/mysql/data <-- this is where MySQL database are stored, and we want to keep them off the VM hard drive allocation... plus keeping them in a shared folder lets backups be easy.
sudo /usr/local/mysql/bin/mysqld --skip-grant &
- ln -s /tmp/mysql.sock /var/run/mysqld.sock
- MySQL daemon config: /etc/init/mysql.conf
- ln -s /usr/local/mysql/bin/mysqld /usr/bin/mysqld
- ln -s /usr/local/mysql/bin/mysqladmin /usr/bin/mysqladmin
- Comment out safeguards in MySQL daemon config
- Add /usr/local/mysql/bin to PATH -- so compilation etc picks up mysql_config
Troubleshooting
Having oddball problems about 'open failed: connect failed: Connection timed out'
Make sure that the port that Vagrant is forwarding matches the port that you are sending. This status message could be your machine saying, "Port X did not respond on the host", for example if you firewall all but a few ports on your Vagrant host machine.
Comments:
Add comments by visiting: Vagrant/Comments