Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
1
Help us understand the problem. What is going on with this article?
@atchy

homebrewでインストールしたmysqlを自動起動できない→できた

More than 3 years have passed since last update.
$ brew tap homebrew/services

homebrew-servicesインストールして、

$ brew services start mysql

ってやればええやん?

Error: Formula `mysql` is not installed.

あれ?

$ brew list | grep mysql
mysql55

ははーん、5.5だったのねめんごめんご

$ brew services start mysql55
Error: Formula `mysql@5.5` is not installed.

ぐっ・・・

$ brew services start mysql@5.5
Error: Formula `mysql@5.5` is not installed.

ぐぬぬぬ・・・mysqlを再インストールしてみよう

$ brew install mysql55
Warning: mysql55 already installed, it's just not migrated
You can migrate formula with `brew migrate mysql@5.5`
Or you can force install it with `brew install mysql@5.5 --force`

既にインストールされてますよ、と。
・・・んん?migrateしろ??

$ brew migrate mysql@5.5
==> Migrating mysql55 to mysql@5.5
==> Unlinking mysql55
Moving to: /usr/local/Cellar/mysql@5.5
==> Linking mysql@5.5

そいやっ

$ brew services start mysql@5.5
==> Successfully started `mysql@5.5` (label: homebrew.mxcl.mysql@5.5)

( ´∀`)bグッ!

ラベルがmysql55 → mysql@5.5 に変わったから、と理解しております

以上です

追記

登録自体はされるのですが、PC起動してもmysqlが自動起動してないようだ・・・
mysql の起動はroot権限でしかできないので、serviceへの登録もroot権限で行わないとだめみたいですね。
なので

$ sudo brew services start mysql@5.5

で( ´∀`)bグッ!

1
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
atchy

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
1
Help us understand the problem. What is going on with this article?