MySQLをHomebrewを利用してインストールする。
Sponsored Links
皆さんこんにちわ
お元気ですか?私は久々にhtml書いていろいろと疲れました。
なんかコードを書くというかどうも検索が多くなります。
さておき、今回はMySQLについて
MySQLとはデータベースの一つです。類似なものにPostgreSQLなどがあります。
特徴はリレーショナルデータベースであることと、高速であることかな。
少し大きいWebページを作る時にはよくお世話になります。
インストールはHomebrew 先生にお手伝いいただきます。
brew install mysql
インストールしたら最後に以下のような文章が出てきます。
(この文章は brew info mysqlで再度出すことができます)
A "/etc/my.cnf" from another install may interfere with a Homebrew-built server starting up correctly. To connect: mysql -uroot To have launchd start mysql at login: ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents Then to load mysql now: launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist Or, if you don't want/need launchctl, you can just run: mysql.server start
まずは、To have launchd start mysql at login以下のパスのリンクを貼る。
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
次にmysqlのデータをロードする。
Then to load mysql now 以下を実行すれば良し
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
最後に確認の為にMySQLを実行。以下のような感じになれば問題ありません。
mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.6.15 Homebrew Copyright (c) 2000, 2013, 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>
いつかチューニングのお話とかもできればいいのかな。