LoginSignup
0

More than 5 years have passed since last update.

Mac(OS X High Sierra)にmysqlをインストールする

Last updated at Posted at 2017-10-30

前置き

大学の授業でmysqlを入れてくださいと言われたのは良いものの、案外導入に戸惑ったので友人に聴きながらインストールした

mysqlを最新のMacにターミナルからインストールする

1.まずはbrewのアップデート

$ brew update 

2.次にファイルの権限を変更する(ここだけいつもと違う)

このままインストールすると

Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink share/man/man8/mysqld.8
/usr/local/share/man/man8 is not writable.

が出るので

$ sudo chmod ugo+wrx /usr/local/share/man/man8.mysqld.8

としてリンクできるようにしてあげる

3.あとは普通にmysqlを入れる

$ brew install mysql

んで

$ mysql.server start
$ mysql -uroot

で入れるはず!

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0