Giter Site home page Giter Site logo

vagrant-mysql's Introduction

Vagrant MySQL

Puropse

This is a vagrant box that I use for my local developpements to provide a clean MySQL database.

Prerequisite

This box requieres vagrant 1.6+ and virtualbox to be installed on the host machine.

Usage

Setting up the VM

After cloning the project, you will need to start the vagrant box.

    vagrant up

There is still a little bug to fix (see below) in the provisionning configuration, so once the machine is running you may need to re-provision it.

    vagrant provison

MySQL Access

Once the machine is ready, the local MySQL default port (3306) on host machine will be forwarded to the 3306 port on guest machine.

You will now be able to access the database with this credentials :

  • Host : localhost
  • database : test
  • User : test
  • Password : azerty

This can be changed in the puppet/manifests/init.pp file

    mysql::db { 'test':
        user     => 'test',
        password => 'azerty',
        host     => '%',
        grant    => ['ALL'],
    }

You will need to restart the guest machine for the changes to be applied

    vagrant reload --provision

Local MySQL conflict

If you already use the 3306 port for a local MySQL, you can change it by modifying the Vagrantfile file. Let's say you want to set it to 3307.

    config.vm.network :forwarded_port, host: 3307, guest: 3306

You will need to restart the guest machine for the changes to be applied

    vagrant reload

Know issues / Enhancements

Issues

  • There can be sometime an execution order problem in provisioning configuration, and mysql might execute before apt-get is ready. This requires to re-provision after starting the VM for the first time.

Enhancements

  • Set the MySQL config in the Vagrantfile

vagrant-mysql's People

Contributors

skwi avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.