The problem that wampserver cannot start mysql database

Source: Internet
Author: User
I recently made a website project and prepared a message board yesterday. For the convenience of the diagram, I saw on the Internet how PHPCMSv9 uses the guidance module to automatically generate the message board, so I was prepared to steal it. After the installation is complete, you can see that the green wampserver icon in the lower right corner turns orange. After exiting, restart wampserver and find that it cannot be started normally.

I recently made a website project and prepared a message board yesterday. For the convenience of the diagram, I saw on the Internet how the PHPCMS v9 guide can automatically generate the message board module, so I was prepared to steal it. After the installation is complete, you can see that the green wampserver icon in the lower right corner turns orange. After exiting, restart wampserver and find that it cannot be started normally.

I recently made a website project and prepared a message board yesterday. For the convenience of the diagram, I saw on the Internet how the PHPCMS v9 guide can automatically generate the message board module, so I was prepared to steal it. After the installation is complete, you can see that the green wampserver icon in the lower right corner turns orange. After exiting, restart wampserver and find that it cannot be started normally. The icon remains in orange. Open phpmyadmin on wampserver and enter the password. The prompt #2002 cannot log on to the mysql server. I realized something went wrong. It should be because the apache or mysql of PHPCMS v9 just installed conflicts with the server in wampserver. (No wonder the system file is being modified by 360 during the installation. Do you want to stop this program .) So we started to solve the problem.

First, delete all the installed PHPCMS V9 files. Generally, the change of wampserver to orange may be caused by the failure of apache or mysql server to start normally. First, check the apache server. Run port 80 on wampserver. The console displays "your port 80 is actually used by: server: apache 2.4.4/mysql5.6.12 ". Similar to the version of my own wampserver integration environment, port 80 is being occupied by itself. Then, "Start-> cmd", enter netstat-ano to display the current port connection status. Port 80 is being used by PID 564 activity. Then, enter tasklist in the console to find that the image name with PID 564 is the httpd.exe program. Httpd.exe is a program related to apache. Enter http: // 127.0.0.1: 80 in the address bar to open the file in the www directory corresponding to wampserver. The above indicates that apache is started normally.

In addition to the problem in mysql, besides logging on to phpmyadmin, the error "#2002 cannot log on to the mysql server" is reported. Click mysql of wampserver. Only "Start/continue service", "Install service", and "uninstall service" can be used. Obviously, mysql is not started, so click "Start/continue service". At this time, "Start/continue service" and "Stop Service" can be used. It is strange that "Start/continue service" cannot be used after normal startup. After a while, continue to view mysql-> service and find that only "Start/continue service", "Install service", and "uninstall service" are available. If you barely say that the mysql service has just started, the mysql service has actually stopped. View the port 3306. In the previous method, enter netstat-ano in the console and find that port 3306 is not used by the active connection. Open Control Panel> Administrative Tools> services. Find the wampmysqld service and right-click it to start the service. The error "windowswufa started wampsqld service, error 1067: Unexpected Process Termination" is returned ". Mysql cannot be started at all. So I started browsing Baidu one by one. I found many solutions. For example, delete mysql-related files in the Registry located in HKEY_LOCAL_MECHINE \ SYSTEM \ ControlSet001 and HKEY_LOCAL_MECHINE \ SYSTEM \ ControlSet002, and HKEY_LOCAL_MECHINE \ SYSTEM \ CurrentControlSet. Open the registry, search for mysql, find related files, and delete all files. Log out and restart wampserver. It cannot be started normally. Or open the firewall, or set the config. default. in php, change $ cfg ['servers'] [$ I] ['host'] = "localhost" to $ cfg ['servers'] [$ I] ['host'] = "127.0.0.1 "; after the change, it still fails. So I switched to google, searched for several blogs, and finally found someone with similar problems. The method is to delete the my. ini file in windows on drive C. According to his method, the wampserver was started normally.

Open this my. ini file, which is basically about the mysql configuration file in the PHPCMS v9 just now. I guess it is probably a conflict with mysql in wampserver.

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.