質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
MySQL

MySQL(マイエスキューエル)は、TCX DataKonsultAB社などが開発するRDBMS(リレーショナルデータベースの管理システム)です。世界で最も人気の高いシステムで、オープンソースで開発されています。MySQLデータベースサーバは、高速性と信頼性があり、Linux、UNIX、Windowsなどの複数のプラットフォームで動作することができます。

MacOS(OSX)

MacOSとは、Appleの開発していたGUI(グラフィカルユーザーインターフェース)を採用したオペレーションシステム(OS)です。Macintoshと共に、市場に出てGUIの普及に大きく貢献しました。

MAMP

Mac 上で WordPress などの動的ページのサイトが作れるように環境を構築するフリーソフト

Q&A

1回答

4446閲覧

MAMPとMySQLが起動できない…

kary

総合スコア8

MySQL

MySQL(マイエスキューエル)は、TCX DataKonsultAB社などが開発するRDBMS(リレーショナルデータベースの管理システム)です。世界で最も人気の高いシステムで、オープンソースで開発されています。MySQLデータベースサーバは、高速性と信頼性があり、Linux、UNIX、Windowsなどの複数のプラットフォームで動作することができます。

MacOS(OSX)

MacOSとは、Appleの開発していたGUI(グラフィカルユーザーインターフェース)を採用したオペレーションシステム(OS)です。Macintoshと共に、市場に出てGUIの普及に大きく貢献しました。

MAMP

Mac 上で WordPress などの動的ページのサイトが作れるように環境を構築するフリーソフト

0グッド

0クリップ

投稿2016/08/03 21:53

編集2016/08/14 06:22

###前提・実現したいこと

すみません。初心者の質問で申し訳ありません。
2点課題があり、それを解決したいです。
0. MacでMAMPにてローカル環境を使用しておりましたが、エラーが出るようになってしまいました。
0. 自身でMySQLを確認したいと思い、「mysql.server start」をおこなったところエラーになります。

###発生している問題・エラーメッセージ

①MySQL のメッセージ: ドキュメント

接続できません。設定が無効です。
MySQL サーバに接続しようとしましたが拒否されました。config.inc.php のホスト、ユーザ名、パスワードが MySQL サーバの管理者から与えられた情報と一致するか確認してください。

②$ mysql.server start
Starting MySQL
. ERROR! The server quit without updating PID file (/usr/local/var/mysql/**.local.pid).

###試したこと
下記で表示される内容を試してみたのですが、うまくいきませんでした。
http://ukonlly.hatenablog.jp/entry/20080619/1213875803
http://oshiete.goo.ne.jp/qa/3842901.html
http://oshiete.goo.ne.jp/qa/3842901.html
https://www.google.co.jp/search?q=.+ERROR!+The+server+quit+without+updating+PID+file+(%2Fusr%2Flocal%2Fvar%2Fmysql%2FYusukeKariya-no-MacBook-Pro.local.pid).&oq=.+ERROR!+The+server+quit+without+updating+PID+file+(%2Fusr%2Flocal%2Fvar%2Fmysql%2FYusukeKariya-no-MacBook-Pro.local.pid).&aqs=chrome..69i57.525j0j7&sourceid=chrome&ie=UTF-8

###エラーログ
以下/Applications/MAMP/logs/apache_error.log

[Thu Jul 14 13:34:48 2016] [notice] Digest: generating secret for digest authentication ...
[Thu Jul 14 13:34:48 2016] [notice] Digest: done
[Thu Jul 14 13:34:48 2016] [notice] FastCGI: process manager initialized (pid 32874)
[Thu Jul 14 13:34:48 2016] [notice] Apache/2.2.29 (Unix) mod_wsgi/3.5 Python/2.7.10 PHP/7.0.8 mod_ssl/2.2.29 OpenSSL/0.9.8zg DAV/2 mod_fastcgi/2.4.6 mod_perl/2.0.9 Perl/v5.22.0 configured -- resuming normal operations
[Thu Jul 14 13:34:51 2016] [error] [client ::1] File does not exist: /Applications/MAMP/htdocs/docs-assets, referer: http://localhost:8888/MAMP/?language=Japanese
[Thu Jul 14 13:36:28 2016] [notice] caught SIGTERM, shutting down
[Thu Jul 14 13:36:33 2016] [notice] Digest: generating secret for digest authentication ...
[Thu Jul 14 13:36:33 2016] [notice] Digest: done
[Thu Jul 14 13:36:33 2016] [notice] FastCGI: process manager initialized (pid 32992)
[Thu Jul 14 13:36:33 2016] [notice] Apache/2.2.29 (Unix) mod_wsgi/3.5 Python/2.7.10 PHP/7.0.8 mod_ssl/2.2.29 OpenSSL/0.9.8zg DAV/2 mod_fastcgi/2.4.6 mod_perl/2.0.9 Perl/v5.22.0 configured -- resuming normal operations
[Sun Jul 17 08:11:04 2016] [error] [client ::1] script '/Applications/MAMP/bin/phpMyAdmin/main.php' not found or unable to stat, referer: http://localhost/phpMyAdmin/?lang=ja
[Sun Jul 17 10:05:54 2016] [error] [client ::1] File does not exist: /Applications/MAMP/htdocs/mtfuji-local.com, referer: http://localhost/
[Wed Jul 27 07:00:30 2016] [error] [client ::1] File does not exist: /Applications/MAMP/htdocs/dreamstore-shinjuku
[Thu Aug 04 06:27:08 2016] [notice] Digest: generating secret for digest authentication ...
[Thu Aug 04 06:27:08 2016] [notice] Digest: done
[Thu Aug 04 06:27:08 2016] [notice] FastCGI: process manager initialized (pid 31483)
[Thu Aug 04 06:27:08 2016] [notice] Apache/2.2.29 (Unix) mod_wsgi/3.5 Python/2.7.10 PHP/7.0.8 mod_ssl/2.2.29 OpenSSL/0.9.8zg DAV/2 mod_fastcgi/2.4.6 mod_perl/2.0.9 Perl/v5.22.0 configured -- resuming normal operations
[Thu Aug 04 06:27:10 2016] [error] [client ::1] File does not exist: /Applications/MAMP/htdocs/docs-assets, referer: http://localhost/MAMP/?language=Japanese
[Sun Aug 07 21:32:21 2016] [notice] caught SIGTERM, shutting down
[Sun Aug 14 15:02:07 2016] [notice] Digest: generating secret for digest authentication ...
[Sun Aug 14 15:02:07 2016] [notice] Digest: done
[Sun Aug 14 15:02:07 2016] [notice] FastCGI: process manager initialized (pid 12961)
[Sun Aug 14 15:02:08 2016] [notice] Apache/2.2.29 (Unix) mod_wsgi/3.5 Python/2.7.10 PHP/7.0.8 mod_ssl/2.2.29 OpenSSL/0.9.8zg DAV/2 mod_fastcgi/2.4.6 mod_perl/2.0.9 Perl/v5.22.0 configured -- resuming normal operations
[Sun Aug 14 15:05:36 2016] [notice] caught SIGTERM, shutting down
[Sun Aug 14 15:05:38 2016] [notice] Digest: generating secret for digest authentication ...
[Sun Aug 14 15:05:38 2016] [notice] Digest: done
[Sun Aug 14 15:05:38 2016] [notice] FastCGI: process manager initialized (pid 16702)
[Sun Aug 14 15:05:38 2016] [notice] Apache/2.2.29 (Unix) mod_wsgi/3.5 Python/2.7.10 PHP/7.0.8 mod_ssl/2.2.29 OpenSSL/0.9.8zg DAV/2 mod_fastcgi/2.4.6 mod_perl/2.0.9 Perl/v5.22.0 configured -- resuming normal operations
[Sun Aug 14 15:11:58 2016] [notice] caught SIGTERM, shutting down
~

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

パーミッションの問題?

/usr/local/var/mysql/
のパーミッションを確認の上、mysqlの起動ユーザーがmysqlなら
chown -R mysql:mysql /usr/local/var/mysql/
的な処理が有効かも(ご使用の環境にあわせてください)

起動時のエラーなので微妙ですがログファイルにもう少し
詳しい情報が残っているかもしれません

投稿2016/08/04 01:20

yambejp

総合スコア114769

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

kary

2016/08/05 00:17 編集

ご回答いただきありがとうございます。 以下が、パーミッションになります。 また、いただいたコマンドを実行した後も、現状解決には至りませんでした。 -rw-r----- 1 _mysql _mysql 94450 8 4 05:57 **.local.err -rw-r----- 1 _mysql _mysql 56 7 13 07:39 auto.cnf -rw------- 1 _mysql _mysql 1680 7 13 07:39 ca-key.pem -rw-r--r-- 1 _mysql _mysql 1075 7 13 07:39 ca.pem -rw-r--r-- 1 _mysql _mysql 1079 7 13 07:39 client-cert.pem -rw------- 1 _mysql _mysql 1680 7 13 07:39 client-key.pem drwxr-x--- 3 _mysql _mysql 102 7 13 07:47 eccube_db -rw-r----- 1 _mysql _mysql 414 7 13 07:39 ib_buffer_pool -rw-r----- 1 _mysql _mysql 50331648 7 13 07:46 ib_logfile0 -rw-r----- 1 _mysql _mysql 50331648 7 13 07:39 ib_logfile1 -rw-r----- 1 _mysql _mysql 12582912 7 13 07:46 ibdata1 -rw-r----- 1 _mysql _mysql 12582912 7 13 07:46 ibtmp1 drwxr-x--- 3 _mysql _mysql 102 7 18 08:49 inventory drwxr-x--- 77 _mysql _mysql 2618 7 13 07:39 mysql drwxr-x--- 90 _mysql _mysql 3060 7 13 07:39 performance_schema -rw------- 1 _mysql _mysql 1676 7 13 07:39 private_key.pem -rw-r--r-- 1 _mysql _mysql 452 7 13 07:39 public_key.pem -rw-r--r-- 1 _mysql _mysql 1079 7 13 07:39 server-cert.pem -rw------- 1 _mysql _mysql 1676 7 13 07:39 server-key.pem drwxr-x--- 108 _mysql _mysql 3672 7 13 07:39 sys
kary

2016/08/05 00:19

また、 **.local.errファイルにログは存在しておりませんでした。 なにか認識に齟齬がある場合はご教示頂けますと幸いです。
yambejp

2016/08/05 00:31

mysql.server stopしてからmysql.server startしてもダメですかね? /usr/local/var/mysql/**.local.pid のマスクしてある部分がよくわかりませんが。 touch /usr/local/var/mysql/**.local.pid して空ファイルを作ってみてはどうでしょう?
kary

2016/08/05 17:02

***:mysql ***$ touch /usr/local/var/mysql/***.local.pid touch: /usr/local/var/mysql/***.local.pid: Permission denied ***:mysql ***$ mysql.server stop ERROR! MySQL server PID file could not be found! ***:mysql ***$ mysql.server start Starting MySQL . ERROR! The server quit without updating PID file (/usr/local/var/mysql/***.local.pid).
kary

2016/08/07 14:24 編集

こちらエラーログでしょうか? sudo tail -f /usr/local/var/mysql/***-no-MacBook-Pro.local.err 2016-08-07T14:20:47.153507Z 0 [ERROR] Plugin 'InnoDB' init function returned error. 2016-08-07T14:20:47.153565Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2016-08-07T14:20:47.153588Z 0 [ERROR] Failed to initialize plugins. 2016-08-07T14:20:47.153595Z 0 [ERROR] Aborting 2016-08-07T14:20:47.153610Z 0 [Note] Binlog end 2016-08-07T14:20:47.153698Z 0 [Note] Shutting down plugin 'CSV' 2016-08-07T14:20:47.154148Z 0 [Note] /usr/local/Cellar/mysql/5.7.13/bin/mysqld: Shutdown complete 2016-08-07T14:20:47.6NZ mysqld_safe mysqld from pid file /usr/local/var/mysql/***-no-MacBook-Pro.local.pid ended 2016-08-07T14:20:57.6NZ mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql 2016-08-07T14:20:57.553027Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2016-08-07T14:20:57.553271Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path. 2016-08-07T14:20:57.553322Z 0 [Note] /usr/local/Cellar/mysql/5.7.13/bin/mysqld (mysqld 5.7.13) starting as process 98916 ... 2016-08-07T14:20:57.555318Z 0 [Warning] Can't create test file /usr/local/var/mysql/ç-no-MacBook-Pro.lower-test 2016-08-07T14:20:57.555340Z 0 [Warning] Can't create test file /usr/local/var/mysql/***-no-MacBook-Pro.lower-test 2016-08-07T14:20:57.556810Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2016-08-07T14:20:57.556831Z 0 [Note] InnoDB: Uses event mutexes 2016-08-07T14:20:57.556837Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier 2016-08-07T14:20:57.556840Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3 2016-08-07T14:20:57.557183Z 0 [Note] InnoDB: Number of pools: 1 2016-08-07T14:20:57.557357Z 0 [Note] InnoDB: Using CPU crc32 instructions 2016-08-07T14:20:57.558594Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M 2016-08-07T14:20:57.569435Z 0 [Note] InnoDB: Completed initialization of buffer pool 2016-08-07T14:20:57.582298Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable 2016-08-07T14:20:57.582348Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable 2016-08-07T14:20:57.582374Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error 2016-08-07T14:20:57.892520Z 0 [ERROR] Plugin 'InnoDB' init function returned error. 2016-08-07T14:20:57.892618Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2016-08-07T14:20:57.892666Z 0 [ERROR] Failed to initialize plugins. 2016-08-07T14:20:57.892674Z 0 [ERROR] Aborting 2016-08-07T14:20:57.892736Z 0 [Note] Binlog end 2016-08-07T14:20:57.892841Z 0 [Note] Shutting down plugin 'CSV' 2016-08-07T14:20:57.893425Z 0 [Note] /usr/local/Cellar/mysql/5.7.13/bin/mysqld: Shutdown complete 2016-08-07T14:20:57.6NZ mysqld_safe mysqld from pid file /usr/local/var/mysql/***-no-MacBook-Pro.local.pid ended 2016-08-07T14:21:08.6NZ mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql 2016-08-07T14:21:08.302934Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2016-08-07T14:21:08.303159Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path. 2016-08-07T14:21:08.303204Z 0 [Note] /usr/local/Cellar/mysql/5.7.13/bin/mysqld (mysqld 5.7.13) starting as process 99015 ... 2016-08-07T14:21:08.305388Z 0 [Warning] Can't create test file /usr/local/var/mysql/***-no-MacBook-Pro.lower-test 2016-08-07T14:21:08.305417Z 0 [Warning] Can't create test file /usr/local/var/mysql/***-no-MacBook-Pro.lower-test 2016-08-07T14:21:08.308381Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2016-08-07T14:21:08.308413Z 0 [Note] InnoDB: Uses event mutexes 2016-08-07T14:21:08.308425Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier 2016-08-07T14:21:08.308433Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3 2016-08-07T14:21:08.308887Z 0 [Note] InnoDB: Number of pools: 1 2016-08-07T14:21:08.309001Z 0 [Note] InnoDB: Using CPU crc32 instructions 2016-08-07T14:21:08.310551Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M 2016-08-07T14:21:08.322867Z 0 [Note] InnoDB: Completed initialization of buffer pool 2016-08-07T14:21:08.337493Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable 2016-08-07T14:21:08.337626Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable 2016-08-07T14:21:08.337724Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error 2016-08-07T14:21:08.644094Z 0 [ERROR] Plugin 'InnoDB' init function returned error. 2016-08-07T14:21:08.644139Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2016-08-07T14:21:08.644185Z 0 [ERROR] Failed to initialize plugins. 2016-08-07T14:21:08.644192Z 0 [ERROR] Aborting 2016-08-07T14:21:08.644212Z 0 [Note] Binlog end 2016-08-07T14:21:08.644324Z 0 [Note] Shutting down plugin 'CSV' 2016-08-07T14:21:08.644831Z 0 [Note] /usr/local/Cellar/mysql/5.7.13/bin/mysqld: Shutdown complete 2016-08-07T14:21:08.6NZ mysqld_safe mysqld from pid file /usr/local/var/mysql/***-no-MacBook-Pro.local.pid ended 2016-08-07T14:21:18.6NZ mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql 2016-08-07T14:21:19.069103Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2016-08-07T14:21:19.069338Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path. 2016-08-07T14:21:19.069388Z 0 [Note] /usr/local/Cellar/mysql/5.7.13/bin/mysqld (mysqld 5.7.13) starting as process 99113 ... 2016-08-07T14:21:19.071338Z 0 [Warning] Can't create test file /usr/local/var/mysql/***-no-MacBook-Pro.lower-test 2016-08-07T14:21:19.071363Z 0 [Warning] Can't create test file /usr/local/var/mysql/***-no-MacBook-Pro.lower-test 2016-08-07T14:21:19.072802Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2016-08-07T14:21:19.072829Z 0 [Note] InnoDB: Uses event mutexes 2016-08-07T14:21:19.072840Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier 2016-08-07T14:21:19.072847Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3 2016-08-07T14:21:19.073305Z 0 [Note] InnoDB: Number of pools: 1 2016-08-07T14:21:19.073443Z 0 [Note] InnoDB: Using CPU crc32 instructions 2016-08-07T14:21:19.074942Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M 2016-08-07T14:21:19.086644Z 0 [Note] InnoDB: Completed initialization of buffer pool 2016-08-07T14:21:19.098791Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable 2016-08-07T14:21:19.098829Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable 2016-08-07T14:21:19.098846Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error 2016-08-07T14:21:19.406911Z 0 [ERROR] Plugin 'InnoDB' init function returned error. 2016-08-07T14:21:19.406937Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2016-08-07T14:21:19.406945Z 0 [ERROR] Failed to initialize plugins. 2016-08-07T14:21:19.406950Z 0 [ERROR] Aborting 2016-08-07T14:21:19.406960Z 0 [Note] Binlog end 2016-08-07T14:21:19.407033Z 0 [Note] Shutting down plugin 'CSV' 2016-08-07T14:21:19.407376Z 0 [Note] /usr/local/Cellar/mysql/5.7.13/bin/mysqld: Shutdown complete 2016-08-07T14:21:19.6NZ mysqld_safe mysqld from pid file /usr/local/var/mysql/***-no-MacBook-Pro.local.pid ended
kary

2016/08/07 13:30

http://localhost/check_mysql.php 上記にアクセスしたところ以下のようなerrorが出ておりました。 Error:SQLSTATE[HY000] [2002] Connection refused
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問