# Boxenでmysqlを入れる
macにmysql入れるのめんどうやなー、というより構築作業自体がめんどうやなー。 え、簡単にできるって?
そうBoxenならね!
Puppetfileに以下を追記
github "mysql", "1.2.0"
githubリポジトリは https://github.com/boxen/puppet-mysql ここでっせ
あとは、manifestにmysqlを使う事を記述する modules/people/manifests/<gihubアカウント>.pp
include mysql mysql::db { 'mydb': }
え、これだけでいいの?
あとは、boxen実行
$ script/boxen ... ... Notice: /Stage[main]/People::<githubアカウント名>/Mysql::Db[mydb]/Exec[create mysql db mydb]/returns: executed successfully ... ...
完了したみたい
これだけで、mysqlが入ったのか?確認
$ mysql -u root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 7 Server version: 5.5.20 Source distribution Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | test | |mydb | +--------------------+ 2 rows in set (0.00 sec)
はい、完了。 本当に、簡単でした
rootでノーパスは危険なので、あとでちゃんと消しましょう!
※追記 boxenで入れたmysqlは13306ポートで動いているようです。