Solve the problem that the MYSQL connection port is occupied by the introduced file path, mysql introduces

Source: Internet
Author: User

Solve the problem that the MYSQL connection port is occupied by the introduced file path, mysql introduces

This morning, I plan to use Wampserver to build the PHP environment and configure my own mini-programs. After downloading the latest wampserver 3.0.6 for installation, I found that mysql has been unable to run and thought it was a problem with the wampserver version. Then I downloaded the related versions such as 2.4 and 2.5 for installation, which is still unsolved, the main cause is that the mysql command string does not respond after the password is entered, and the command string disappears automatically. In addition, when the password is entered in PHPMyAdmin, three error messages, such as connection timeout, are displayed, or the system prompts that the connection fails. Later, I uninstalled wampserver directly, switched to phpStudy to build the environment, started after installation, and started Apache normally, but mysql started to prompt that the port was occupied. Now the problem is finally found,The real reason why mysql cannot be connected is that the local port is occupied. Then I open the general port settings in the phpStudy settings, change the mysql port to 3305, and then save and restart. The problem is solved perfectly, in addition, set the bound domain name and path in the local phpStudy and then modify the host file. Your program configuration is successful.

When you modify a PHP program in the afternoon, place the program in phpStudy, configure the path domain name and host file, modify the database connection file, and cause a path error when running the program, because the program is obtained from the LINUX server, the file path in the program must be modified correctly,Include_once ""After modifying the path, run it again. Register a member and go to the white screen on the database Writing Page. After a while, the system prompts that the connection times out. It is estimated that the connection port is still a problem, so I modified the database connection code.$ Db = new ezSQL_mysql ('root', 'root', 'sd', 'localhost: 3305 ')The problem has been resolved.

The above article solves the problem that the MYSQL connection port is occupied by the introduced file path error. It is all the content that I have shared with you. I hope you can give us a reference and also hope you can provide more support to the customer's house.

Related Article

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.