已经安装了 apache 和 mysql 的 XAMPP
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5096613/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
XAMPP with apache and mysql already installed
提问by Fernando Pinheiro
is there any problem to install xampp with apache and mysql already installed?
在已经安装了 apache 和 mysql 的情况下安装 xampp 有什么问题吗?
回答by JSmitty
There shouldn't be any problem. Just know that you won't be able to start both Apache servers or by MySQL servers at the same time without modifying them to use non-standard ports. (You could easily use the XAMPP MySQL server with your existing Apache or your existing MySQL server with the XAMPP Apache.)
应该没有什么问题。请注意,如果不修改它们以使用非标准端口,您将无法同时启动两个 Apache 服务器或 MySQL 服务器。(您可以轻松地将 XAMPP MySQL 服务器与您现有的 Apache 或您现有的 MySQL 服务器与 XAMPP Apache 一起使用。)
You may also have some problems with registering the XAMPP Apache and MySQL as Windows services using the XAMPP controls if you have your other Apache and MySQL servers configured as services (I'm expecting service name conflicts).
如果您将其他 Apache 和 MySQL 服务器配置为服务,则在使用 XAMPP 控件将 XAMPP Apache 和 MySQL 注册为 Windows 服务时可能还会遇到一些问题(我预计服务名称会发生冲突)。
If you already have Apache and MySQL installed on your machine, I'm not sure why you would want to also install XAMPP.
如果您的机器上已经安装了 Apache 和 MySQL,我不确定您为什么还要安装 XAMPP。
回答by sagar
The best way is to change the port number from 3306 to 3307 for the pre-existing MySQL server so you can use both MySQL instances (XAMPP MySQL and pre-existing MySQL) simultaneously without conflict.
最好的方法是将预先存在的 MySQL 服务器的端口号从 3306 更改为 3307,这样您就可以同时使用两个 MySQL 实例(XAMPP MySQL 和预先存在的 MySQL)而不会发生冲突。
回答by Robin
For personal use? Works fine! Just use the right applications (xampp_start/xampp_stop) to run apache/mysql server!
个人使用?工作正常!只需使用正确的应用程序(xampp_start/xampp_stop)来运行 apache/mysql 服务器!
回答by Michael
I think you might want to consider removing apache and mysql and installing xampp after. Xampp will add both and they might collide if you install xampp and they are already installed. You should do a backup on your mysql databases and put them back after and you should be fine.
我认为您可能需要考虑删除 apache 和 mysql 并在之后安装 xampp。Xampp 将添加两者,如果您安装 xampp 并且它们已经安装,它们可能会发生冲突。你应该对你的 mysql 数据库做一个备份,然后把它们放回去,你应该没问题。
回答by Colnel Vortex
You need to change the port number in MySQL installer, you will find an option to reconfigure MySQL server.
您需要在 MySQL 安装程序中更改端口号,您将找到重新配置 MySQL 服务器的选项。
Change its port number to 3308
and everything will work fine then.
将其端口号更改为,3308
然后一切正常。
回答by Mohannad
There should be no problem, but you need to decide which MySQL server you will use, whether the installed one along XAMPP or the exist MySQL server
应该没有问题,但是您需要决定使用哪个 MySQL 服务器,是沿 XAMPP 安装的还是现有的 MySQL 服务器
回答by stevenbranigan82
If you have Apache and MySQL already installed then why do you need XAMPP? Surely you already have the full LAMP / WAMP stack already?
如果您已经安装了 Apache 和 MySQL,那么为什么还需要 XAMPP?您肯定已经拥有完整的 LAMP / WAMP 堆栈了吗?
Just to add a note.
只是为了添加一个注释。
I had previously installed MySQL server on my local machine for some development projects that didn't require an ..AMP stack. Mainly NodeJS, Angular and Java applications.
我之前在本地机器上为一些不需要 ..AMP 堆栈的开发项目安装了 MySQL 服务器。主要是 NodeJS、Angular 和 Java 应用程序。
Most of my web development was done on an ubuntu server running a LAMP stack, so I never bothered to set up a local development environment for web development.
我的大部分 Web 开发都是在运行 LAMP 堆栈的 ubuntu 服务器上完成的,所以我从不费心为 Web 开发设置本地开发环境。
In the last couple of days I decided to setup a development environment on my Windows 10 machine using XAMPP (with a MySQL server already running). Here is what I found:
在过去的几天里,我决定使用 XAMPP(已经运行 MySQL 服务器)在我的 Windows 10 机器上设置一个开发环境。这是我发现的:
Running projects that connect to the local MySQL server is not an issue since all the database connections are written in each individual project. So really, installing MySQL with XAMPP is not a requirement at all. You can definitely live without it being part of the XAMPP install.
运行连接到本地 MySQL 服务器的项目不是问题,因为所有数据库连接都写在每个单独的项目中。所以真的,用 XAMPP 安装 MySQL 根本不是必需的。您绝对可以在没有它成为 XAMPP 安装的情况下生活。
What I did want was the phpmyadmin console for administering the existing MySQL server. So, I did some digging through the xampp directories.
我想要的是用于管理现有 MySQL 服务器的 phpmyadmin 控制台。因此,我对 xampp 目录进行了一些挖掘。
You can add the username and password of the local MySQL database server in this file:
您可以在此文件中添加本地 MySQL 数据库服务器的用户名和密码:
/xampp/phpMyAdmin/config.inc.php
/xampp/phpMyAdmin/config.inc.php
phpMyAdmin will now be accessible via http://localhost/phpmyadminand will be connected to the existing MySQL installation.
phpMyAdmin 现在可以通过http://localhost/phpmyadmin 访问,并将连接到现有的 MySQL 安装。
You will also need to create a phpmyadmin database on the local MySQL server to store the phpmyadmin settings, plus a 'pma'@'localhost' account with no password. Logging into phpyadmin will prompt you for creating the database, just follow the prompts and phpmyadmin will handle the database creation. The pma (PhpMyAdmin) user will have to be created manually, no password, with full admin permissions. Now you are good to go...
您还需要在本地 MySQL 服务器上创建一个 phpmyadmin 数据库来存储 phpmyadmin 设置,以及一个没有密码的 'pma'@'localhost' 帐户。登录phpyadmin会提示你创建数据库,按照提示操作,phpmyadmin会处理数据库的创建。pma ( Php My Admin) 用户必须手动创建,没有密码,具有完全管理员权限。现在你可以走了……
I tried my best to link the MySQL server to the XAMPP admin console but struggled to get the XAMPP admin console to recognise that the MySQL server was enabled. I tried editing the path to the mysqld.exe and my-default.ini files in several of the XAMPP files but none made a difference. I would love to know if this is possible.
我尽力将 MySQL 服务器链接到 XAMPP 管理控制台,但很难让 XAMPP 管理控制台识别出 MySQL 服务器已启用。我尝试在几个 XAMPP 文件中编辑 mysqld.exe 和 my-default.ini 文件的路径,但没有任何区别。我很想知道这是否可能。
Files I edited:
我编辑的文件:
- uMain.pas
- xampp_shell.bat
- MySQL_start.bat
- xampp_start.c
- ctl.bat
- uMain.pas
- xampp_shell.bat
- MySQL_start.bat
- xampp_start.c
- bat文件
Unfortunately none of the edits made a difference. However, I was still able to admin the MySQL server from phpmyadmin and MySQL Workbench so no loss really.
不幸的是,没有任何编辑有什么不同。但是,我仍然能够从 phpmyadmin 和 MySQL Workbench 管理 MySQL 服务器,因此确实没有损失。
Hope that helps someone :)
希望对某人有所帮助:)
回答by Vijay Chauhan
It really easy ...Just u have to stop apache and mysql services manually ..no need to modify any port no.
这真的很容易......只是你必须手动停止apache和mysql服务......不需要修改任何端口号。
After that u can start the apache and mysql service through Xammp :)
之后你可以通过 Xammp 启动 apache 和 mysql 服务:)