mySQLとXAMPPのポートの競合 質問する

mySQLとXAMPPのポートの競合 質問する

私はしばらくの間 XAMPP/Apache を使用していましたが、最近 MySQL をインストールすることにしました。しかし、どうやら競合しているようです。MySQL が優先されているようで、正しく機能していますが、XAMPP/Apache で Apache を起動しようとすると次のエラー メッセージが表示されます。

03:07:32 AM  [Apache]   Attempting to start Apache app...
03:07:33 AM  [Apache]   Status change detected: running
03:07:33 AM  [Apache]   Status change detected: stopped
03:07:33 AM  [Apache]   Error: Apache shutdown unexpectedly.
03:07:33 AM  [Apache]   This may be due to a blocked port, missing dependencies, 
03:07:33 AM  [Apache]   improper privileges, a crash, or a shutdown by another method.
03:07:33 AM  [Apache]   Press the Logs button to view error logs and check
03:07:33 AM  [Apache]   the Windows Event Viewer for more clues
03:07:33 AM  [Apache]   If you need more help, copy and post this
03:07:33 AM  [Apache]   entire log window on the forums

以下の指示に従ってみました:http://www.complete-concrete-concise.com/web-tools/how-to-change-the-apache-port-in-xampp

そして、xampp/apache/confのhttpd.confというドキュメントを変更してみました。

「Listen 80」をいろいろ変更し、アプリケーションを再起動した後、同じエラー メッセージが表示されました。

この件に関してご助力いただければ幸いです。XAMPP を使用するためだけに mySQL を削除することは避けたいのですが、両方を同時に動作させる方法がない場合は削除します。

前もって感謝します。

編集:

これが MySQL と競合していると私が考える理由は次のとおりです。

03:26:51 AM  [mysql]    Problem detected!
03:26:51 AM  [mysql]    Port 3306 in use by ""C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqld.exe" --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.6\my.ini" MySQL56"!
03:26:51 AM  [mysql]    MySQL WILL NOT start without the configured ports free!
03:26:51 AM  [mysql]    You need to uninstall/disable/reconfigure the blocking application
03:26:51 AM  [mysql]    or reconfigure MySQL and the Control Panel to listen on a different port

XAMPP/Apache を利用するために、mySQL を一時的に無効にするのが困難です。共存できるようにポートを変更する方法はありますか?

編集2:

ここでの指示に従ってみました:http://silentlyrun.blogspot.com.au/2013/02/how-to-change-apache-n-mysql-port-for.html

次のエラー メッセージが表示されるのは、次の場合です。

09:13:22 AM  [main]     Initializing Modules
09:13:22 AM  [Apache]   Problem detected!
09:13:22 AM  [Apache]   Port 80 in use by "Unable to open process" with PID 4084!
09:13:22 AM  [Apache]   Apache WILL NOT start without the configured ports free!
09:13:22 AM  [Apache]   You need to uninstall/disable/reconfigure the blocking application
09:13:22 AM  [Apache]   or reconfigure Apache and the Control Panel to listen on a different port
09:13:22 AM  [Apache]   Problem detected!
09:13:22 AM  [Apache]   Port 443 in use by "Unable to open process" with PID 4084!
09:13:22 AM  [Apache]   Apache WILL NOT start without the configured ports free!
09:13:22 AM  [Apache]   You need to uninstall/disable/reconfigure the blocking application
09:13:22 AM  [Apache]   or reconfigure Apache and the Control Panel to listen on a different port

これらの手順に従うと、新しいポートは同じになるはずですか? どちらも元々 80 なので、そうだと思います。

4. Search the string "Listen" in the file.
5. Replace port number 80 to any other unused port number.
6. Search for "ServerName" in the file.
7. Replace port number 80 to any other unused port number in the ServerName.

編集3:

理由はわかりませんが、上記の silentlyrun.blogspot リンクから再インストールしてポートを変更した後、XAMPP/MySQL は問題なく動作します。ただし、XAMPP/Apache では依然として問題が発生します。

09:32:14 AM  [Apache]   Error: Apache shutdown unexpectedly.
09:32:14 AM  [Apache]   This may be due to a blocked port, missing dependencies, 
09:32:14 AM  [Apache]   improper privileges, a crash, or a shutdown by another method.
09:32:14 AM  [Apache]   Press the Logs button to view error logs and check
09:32:14 AM  [Apache]   the Windows Event Viewer for more clues
09:32:14 AM  [Apache]   If you need more help, copy and post this
09:32:14 AM  [Apache]   entire log window on the forums

ベストアンサー1

すでに別の MySQL サーバーが実行中の場合に MySQL ポートとサービスの競合を解決するには、次の手順に従う必要があります。

  1. XAMPPサーバーを閉じる

  2. ファイル C:\xampp\mysql\bin\my.ini を開きます (C: はデフォルトの XAMPP インストールです)

  3. ポート番号3306を3307に置き換えます

# password       = your_password  
port            = 3307
socket         = "C:/xampp/mysql/mysql.sock"

そして

\# The MySQL server
[mysqld]
port= 3307
  1. ファイルを保存し、XAMPP コントロール パネルを開きます (管理者として実行してください。そうしないと、次の変更は許可されません)。

  2. XAMPPコントロールパネルでクリック設定>サービスとポートの設定

  3. 後藤マイグレーションタブ

  4. サービス名の変更マイスクmysqlxamppメインポート33063307

  5. 「保存」をクリックし、「保存してXAMPPを閉じる」をクリックします。

  6. XAMPPを再度実行すると、MySQLサーバーを起動できるようになります。

phpMyAdminでも問題が発生する場合があります

ラインを追加できるもの

$cfg['Servers'][$i]['port'] = '3307';

phpMyAdmin ルート ディレクトリの config.inc.php ファイル内。

おすすめ記事