Exit Wiki

We really like Vagrant for the following reasons:

= 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...

  1. Download from site
  2. cd /usr/local/mysql
  3. tar (wherever you put mysql)
  4. rm /etc/mysql/my.conf
  5. cp /usr/local/mysql/support-files/my-medium.cnf /usr/local/mysql/etc/my.cnf
  6. Add user=vagrant line to /usr/local/mysql/etc/my.cnf. (This is because of the next step...)
  7. 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.

  8. sudo /usr/local/mysql/bin/mysqld --skip-grant &

  9. ln -s /tmp/mysql.sock /var/run/mysqld.sock
  10. MySQL daemon config: /etc/init/mysql.conf
  11. ln -s /usr/local/mysql/bin/mysqld /usr/bin/mysqld
  12. ln -s /usr/local/mysql/bin/mysqladmin /usr/bin/mysqladmin
  13. Comment out safeguards in MySQL daemon config
  14. 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

Vagrant (last edited 2012-05-13 21:53:33 by RyanWilcox)