Importing Mysql database using Ruby/Chef Recipe for Vagrant

后端 未结 3 815
夕颜
夕颜 2021-02-03 13:29

I am writing a chef script to automate setting dev environments. I can get a database created and grant privileges but I am trying to find out a way to import a mysql dump file

3条回答
  •  孤独总比滥情好
    2021-02-03 13:32

    You can create a backup from the MySQL command line client, but not from within a SQL query. You need to execute the command from the shell. I believe the execute resource might do the trick for you:

    http://wiki.opscode.com/display/chef/Resources#Resources-Execute

提交回复
热议问题