Installation of Windows 7 native installed MySQL5 XAMPP

Source: Internet
Author: User
Tags phpmyadmin

This is actually a non-programming technology stickers.

Recently want to contact learning PHP, the computer is Windows7 system notebook, too lazy for this need to install Linux or virtual machine to fire to the lamp, found the XAMPP,XAMPP is an Apache Web server with PHP,PerlandMySQL installation package , Allows users to easily Create a Web server

So the problem came, before the Java EE computer installed mysql5.1, but XAMPP also install the MySQL, version is 5.6, how to ensure that in xampp MySQL use normal situation, the original Java EE MySQL can also be used without problems.

This issue requires the following two key points: first, the MySQL port number can not conflict; the second, two MySQL services do not conflict.


Say the principle, then you can follow the steps to say the solution.

1. Modify the MySQL port number:

The original version 5.1 has already occupied 3306 ports, and many projects have connected to the database of this port, in order to avoid changes to the original project, so the XAMPP MySQL port number is set to 3307.

Note: 3307 is a port number that is not occupied, enter NETSTAT-AON|FINDSTR under DOS command line 3307 View the occupancy of Port 3307. It can also be a 3308-port, as long as it is not occupied.

How to modify:

1) Modify the D:\xampp\mysql\bin directory under the My.ini file, as follows port=3307:

[client] # password = your_password Port = 3307 Socket = "D:/xampp/mysql/mysql.sock" # here Follo WS entries for some specific programs # the MySQL server[mysqld]port= 3307socket = "D:/xampp/mysql/mysql.sock"

2) Modify the config.default.php file in the D:\xampp\phpMyAdmin\libraries directory:

Found it:

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

Switch

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

2. Reset MySQL Service

MySQL exists and runs in Windows as a service, click the Services button in the XAMPP Control panel to open System services, or you can enter services.msc on the command line.

In which the service named MySQL is found, this is the service that MySQL old version 5.1 started, and because of the existence of this service, MySQL will fail to start in XAMPP. The process is to rename the previous MySQL service to ensure that two MySQL services are available.

The procedure is as follows:

1) Administrator mode open the command line and go to the old MySQL path C:\Program files\mysql\mysql Server 5.1\bin

2) Enter mysqld--remove to delete the MySQL service.

3 "Enter MySQL D--install MySQL5.1, create a new named mysql5.1 Service, note the back of the MySQL5.1 parameter must have, if direct Mysqld--install will create a service named MySQL by default.

This will enable MySQL to execute successfully in XAMPP.

Note that if your previous MySQL service name is not the default, then congratulations, the "Reset MySQL service" step is not required.



Open localhost/phpmyadmin/path, root login successful.

Start A previous Java EE system, no problem.

Above.

Installation of Windows 7 native installed MySQL5 XAMPP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.