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

Docker container custom hosts network access operation

Adding the extra_hosts keyword in docker-compose....

Using keras to judge SQL injection attacks (example explanation)

This article uses the deep learning framework ker...

How to install docker on Linux system and log in to docker container through ssh

Note: I use Centos to install docker Step 1: Inst...

CSS code to achieve background gradient and automatic full screen

CSS issues about background gradient and automati...

Detailed description of the function of meta name="" content="

1. Grammar: <meta name="name" content...

The basic use of html includes links, style sheets, span and div, etc.

1. Links Hypertext links are very important in HTM...

Detailed explanation of how components communicate in React

1. What is We can split the communication between...

Several commonly used single-page application website sharing

CSS3Please Take a look at this website yourself, ...

A brief discussion on JS regular RegExp object

Table of contents 1. RegExp object 2. Grammar 2.1...

How to configure Bash environment variables in Linux

Shell is a program written in C language, which i...

When should a website place ads?

I recently discussed "advertising" with...

Two solutions for automatically adding 0 to js regular format date and time

Table of contents background Solution 1 Ideas: Co...