web-dev-qa-db-ja.com

#2002-ターゲットマシンが積極的に拒否したため、接続できませんでした

これは重複しているように見えることもありますが、他の応答を見たところ、問題は解決しませんでした。

私は最近、Windows 7にmysqlプラグインを使用してZend StudioとZend Serverをインストールしました。

私は資格のあるサーバー管理者ではありませんが、完全に無能でもありません。アップロード/ダウンロード時間を短縮するために、ローカル開発の「サーバー」を取得しようと一日を費やしました。

サーバー/マシンと言うときは、自宅のコンピューターを意味します

MysqlをZend Serverで動作させようとして、途方に暮れてしまいました。

私が受信し続けるエラーは(または冗長)です:

#2002 Cannot log in to the MySQL server
or (if i change to 'config' authentication type)
#2002 - No connection could be made because the target machine actively refused it.

The server is not responding (or the local server's socket is not correctly configured).

私が試してみました:

  • $ cfg ['Servers'] [$ i] ['Host']を 'localhost'から '127.0.0.1'に変更します
  • 追加/削除$ cfg ['Servers'] [$ i] ['socket'] = '';
  • Cookieからconfig認証タイプに変更します
  • サーバーとmysqlを再インストールする
  • ファイアウォールを無効にする
  • 再起動マシン

Zendのアプローチは、「phpmyadminセットアップ画面を構成する」ことでした...何回かはわかりません。

ここにいる人は誰でも手を貸してくれますか、私がまだ試したことのない方向に私を向けることができますか?

16
Edward
  1. C:\ wamp\bin\mysql\mysql [your-version]\dataに移動します
  2. 「ib_logfile0」と「ib_logfile1」をコピーして、他の場所に保存します。
  3. 「ib_logfile0」とib_logfile1を削除します

私のためにトリックをしました。それがあなたにも役立つことを願っています。

うまく動作します。しかし、Apacheとmysqlを停止する必要があります。xamppを終了してからファイルを削除する必要があります。正常に削除されたとき。 xamppを起動すると、正しく動作します。

38
Wajdan Zahid

コントロールパネルに移動して、ApacheとMySQLサービスを開始します。

9
hashkishor

昨日までphpMyAdminに接続できましたが、今日はこのエラーが発生し始めました:

2002-no-connection-could-be-made-because-the-target-machine-actively-refused

ここでの回答はどれも本当に問題を解決する助けにはなりませんでした。

mysqlログを確認しました。[C:\ wamp\logs\mysql.log]

と言いました

2015-09-18 01:16:30 5920 [Note] Plugin 'FEDERATED' is disabled.
2015-09-18 01:16:30 5920 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-09-18 01:16:30 5920 [Note] InnoDB: The InnoDB memory heap is disabled
2015-09-18 01:16:30 5920 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2015-09-18 01:16:30 5920 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-09-18 01:16:30 5920 [Note] InnoDB: Not using CPU crc32 instructions
2015-09-18 01:16:30 5920 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-09-18 01:16:30 5920 [Note] InnoDB: Completed initialization of buffer pool
2015-09-18 01:16:30 5920 [Note] InnoDB: Highest supported file format is Barracuda.
2015-09-18 01:16:30 5920 [Note] InnoDB: The log sequence numbers 1765410 and 1765410 in ibdata files do not match the log sequence number 2058233 in the ib_logfiles!
2015-09-18 01:16:30 5920 [Note] InnoDB: Database was not shutdown normally!
2015-09-18 01:16:30 5920 [Note] InnoDB: Starting crash recovery.
2015-09-18 01:16:30 5920 [Note] InnoDB: Reading tablespace information from the .ibd files...
2015-09-18 01:16:30 5920 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace harley/login_confirm uses space ID: 6 at filepath: .\harley\login_confirm.ibd. Cannot open tablespace testdb/testtable which uses space ID: 6 at filepath: .\testdb\testtable.ibd
InnoDB: Error: could not open single-table tablespace file .\testdb\testtable.ibd
InnoDB: We do not continue the crash recovery, because the table may become
InnoDB: corrupt if we cannot apply the log records in the InnoDB log to it.
InnoDB: To fix the problem and start mysqld:
InnoDB: 1) If there is a permission problem in the file and mysqld cannot
InnoDB: open the file, you should modify the permissions.
InnoDB: 2) If the table is not needed, or you can restore it from a backup,
InnoDB: then you can remove the .ibd file, and InnoDB will do a normal
InnoDB: crash recovery and ignore that table.
InnoDB: 3) If the file system or the disk is broken, and you cannot remove
InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf
InnoDB: and force InnoDB to continue crash recovery here.

この男が問題を引き起こしているという手がかりを得た-InnoDB: Error: could not open single-table tablespace file .\testdb\testtable.ibd

この行2015-09-18 01:16:30 5920 [Note] InnoDB: Database was not shutdown normally!

うーん、私にとってtestdbは単なるtest-dbでした! したがって、C:\ wamp\bin\mysql\mysql5.6.17\data\testdb内のこのファイルを削除することにしました

およびすべてのサービスを再起動、およびphpMyAdminに移動し、今回は問題なく、phpMyAdminが開きました:)

3
spiderman

Wampserverでも同じ問題が発生しています。それは私のために働いた:

このファイルを変更する必要があります: "C:\ wamp\bin\mysql [mysql_version]\my.ini"例: "C:\ wamp\bin\mysql [mysql5.6.12]\my.ini"

デフォルトのポート3306を80に変更します(両方の行20と27)。

ポート= 3306宛先ポート= 80

これがお役に立てば幸いです。

2
SRMR

私の場合、私は以下を行い、私のために働いた

  1. 沼のアイコンをクリックしました。
  2. mySQLに行きました>サービス管理 'wampmysqld64'>サービスをインストールします
  3. 次に、ワンプアイコン>すべてのサービスを再起動します。
2
Naz141

そのエラーを取り除くために私がしなければならないのは、Wampサーバーを再起動することだけでした。

2
paulalexandru

Mysqlサービスを削除して、再度インストールしました。わたしにはできる

1
vinu

Etcフォルダー内のホストファイルを確認し、以下のコメントを追加して、wampサーバーを実行してください。

127.0.0.1 localhost

パス:C:\ Windows\System32\drivers\etc

1
Rifan I

Mysql-serviceが実行されていることを確認してください。

Windowsユーザーの場合:サービスの確認-mysql service

Linuxユーザーの場合: mysqlサービス/デーモンが実行されていることを確認します(サービスmysqlステータス)

よろしくお願いしますJaiswar Vipin Kumar R