Can I save MYSQL server and WAMP Server together?

First I use Struts 2 to develop a website in Java web technology. So I installed Apache Tomcat as a local server and MYSQL as a database (MYSQL is a complete application from mysql.com, not packages like XAMPP or WAMP ...)

But now I switch to learn a little about PHP, so I am installing the full WAMP package. When I start all the WAMP services and go to the browser and type in localhost, everything works fine

But when I go to localhost / phpmyadmin, it seems to connect to the old MYSQL program on my computer (which I used on a Java network). Then restart your computer and use the MYSQL Workbench (in the MYSQL application), but now it connects to the WAMP package database, and I can no longer connect to the old database (on the Java network)

The solution is to remove WAMP, but I need WAMP for PHP

So, I just want to ask how can I use the MYSQL application and the WAMP package together (the MYSQL application for the Java website and the WAMP package for PHP)?

Thank you and apologize for my bad english!

+6
source share
2 answers

Go to C: \ Program Files (x86) \ MySQL \ MySQL Server 5.1 folder and open mine (configuration file) and then go to

[client] port=3306 

Change it to

 [client] port:3307 

This will force phpmyadmin to run on 3306 and Java-Mysql to run on 3307

+5
source

Of course, you can keep both XAMPP and WAMP together, bearing in mind that you changed the default ports for any of them to some other ports, and not to 80,443 and 3306, but sometimes this can create a conflict, as when installing some other third-party programs or enable certain services that run on port 80,443,3306.

The best alternative here is to install one of the servers inside a virtual machine with a network configured as host-only adapter, so that from the base computer you could access the XAMPP / WAMP installed on the virtual machine by simply specifying the ip address virtual machine through a web browser.

or,

If you want to run both XAMPP and WAMP together on the same computer, but only one of the servers at a time, you can continue to install both of them one after the other. But keep in mind that before installing another server, you must completely stop all services running from the XAMPP or WAMP control panel, and then exit the application. After this step, you can continue to install another server without changing any configurations or port numbers. This is due to the fact that in this case we assumed that access to one of the servers would be simultaneously available. Therefore, before starting another server, you must completely exit the application that is currently running, stopping all of its services. If Skype is installed, you must change the incoming connection ports by default, except for ports 80 and 443.

As mentioned above, if at all the intention is to simultaneously access the servers and start them, then using a virtual machine would be best to avoid conflicts and long-term troubleshooting solutions.

If you messed up changing ports and configuration files, you may receive the following error when trying to access phpmyadmin from the XAMPP control panel:

  **mysql said: Cannot connect: invalid settings. xampp** 

Note: when starting the servers, start it as an administrator , and some services will not start properly.

"I INCREASED INSTALLING BOTH XAMPP AND WAMP ON WINDOWS 10 AS SUCH AS MANY THREADS, I CHANGE DEFAULT PORTS FOR MYSQL and APACHE XAMPP, IT WILL ALWAYS BE SIMPLE. XAMPP. Then update XAMPP without changing any configuration or port. STOP SERVICES WAMP, LEAVE APPLICATION AND THEN RUN FROM THE CONTROL PANEL PHPMYADMIN XAMPP. LAST IT WORKS! PROCESS IN BRIEF LOOK, when in reality to select ME HOW MANY HOURS AND STUDY OF BALL AND ON WEB AND TESTS FOR POSSIBLE SOLUTION, BEFORE I DO NOT TAKE IT WITH IT. "

We hope that these tips and tricks will help.

0
source

Source: https://habr.com/ru/post/949374/


All Articles