Solve the problem of MYSQL connection port being occupied and introducing file path errors

Solve the problem of MYSQL connection port being occupied and introducing file path errors

This morning I planned to use Wampserver to build a PHP environment on my local win7 machine and configure my own applet. After downloading the latest wampserver 3.0.6 version and installing it, I found that mysql could not run. I thought it was a problem with the wampserver version, so I downloaded related versions 2.4, 2.5, etc. and installed them, but the problem was still not solved. The main phenomenon was that there was no response after entering the password and pressing Enter in the mysql command prompt, and then the command prompt disappeared automatically. In addition, when I entered the password in PHPMyAdmin, three error prompts such as connection timeout appeared directly, or it prompted that the connection could not be connected. Later, I uninstalled wampserver directly and used phpStudy to build the environment. After installation, I started it. Apache started normally, but when mysql started, it prompted that the port was occupied. The problem was finally found. The real reason why mysql could not connect was that the local port was occupied. Then I opened the general port settings in phpStudy settings, changed the mysql port to 3305, and then saved and restarted. The problem was perfectly solved. In addition, I set the binding domain name and path in the local phpStudy and modified the host file. My own program configuration was successful.

In the afternoon, when I modified a PHP program, I put the program into phpStudy, configured the path domain name and host file, and modified the database connection file. When running the program, a path error occurred because the program was downloaded from the LINUX server, and the file path contained in it needed to be modified correctly. After modifying the path in include_once "", I ran it again and registered a member. When I went to write to the database, the screen was white and there was no response for a long time. After a while, it prompted that the connection timed out. I thought it was probably a problem with the connection port, so I modified the database connection code $db = new ezSQL_mysql('root','root','sd','localhost:3305') and the problem was solved.

The above article on how to solve the problem of MYSQL connection port being occupied and introducing file path errors is all the content that the editor shares with you. I hope it can give you a reference, and I also hope that you will support 123WORDPRESS.COM.

You may also be interested in:
  • Analyze the default installation path of Apache, PHP, and MySQL in centos
  • How to choose the installation path when installing the MySQL 5.5/5.6/5.7 and above installation packages
  • How to view the path of the MySQL configuration file on the Linux server
  • Linux changes the path of mysql database files
  • Solution to the problem that mysql cannot start after modifying the default path of the database

<<:  Docker Stack deployment method steps for web cluster

>>:  JavaScript implements color identification when the mouse passes over the table row

Recommend

37 Tips for a Good User Interface Design (with Pictures)

1. Try to use single column instead of multi-colum...

How to modify the "Browse" button of the html form to upload files

Copy code The code is as follows: <!DOCTYPE HT...

The difference between float and position attributes in CSS layout

CSS Layout - position Property The position attri...

Detailed explanation of common commands in MySQL 8.0+

Enable remote access Enable remote access rights ...

Detailed explanation of webpage screenshot function in Vue

Recently, there is a requirement for uploading pi...

Vue-cli framework implements timer application

Technical Background This application uses the vu...

Tomcat multi-instance deployment and configuration principles

1. Turn off the firewall and transfer the softwar...

A few steps to easily build a Windows SSH server

The SSH mentioned here is called Security Shell. ...

JavaScript canvas to achieve mirror image effect

This article shares the specific code for JavaScr...

Detailed explanation of how to use JavaScript paging component

The pagination component is a common component in...

Theory Popularization——User Experience

1. Concept Analysis 1: UE User Experience <br ...

CentOS8 installation tutorial of jdk8 / java8 (recommended)

Preface At first, I wanted to use wget to downloa...

Simple steps to encapsulate components in Vue projects

Table of contents Preface How to encapsulate a To...

Mysql stores tree structure through Adjacency List (adjacency list)

The following content introduces the process and ...