An error occurred while the MYSQL connection port was occupied by the introduced file path.
This morning, I plan to use Wampserver to build the PHP environment and configure my own program. 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 line does not respond after you enter the password and press enter, and then the command line disappears automatically. In addition, if you enter the password in PHPMyAdmin, the connection times out or a connection failure error occurs. 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. The cause of the problem was finally found, the real reason why mysql cannot be connected is that the local port 3306 is occupied. Then, right-click the phpStudy icon in the lower right corner and choose phpStudy Settings> general port settings to change the mysql port to 3305, then save and restart, and 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 contained in the program must be modified correctly. The include_once statement contains and runs the specified file during script execution, which is similar to the include statement, the only difference is that if a file already exists, it will not be contained again. Such a statement name implies that it will only be contained once. Include_once can be used when the same file may be contained more than once during script execution. To ensure that it is only included once, you can avoid function redefinition and variable re-assignment. If the path contains an error, the file cannot be found. After modifying the path of the file, run the task again. The path error disappears. I tried to register a member and went to the white screen on the database Writing Page. I didn't respond for a long time. After a while, I was prompted that the connection had timed out. At this time, I guess it was still a problem with the connection port, so I modified the database connection statement $ db = new ezSQL_mysql ('root', 'root', 'sd', 'localhost: 3305 ') to configure the port, run the program again and register the member.
In addition, the local database allows remote access. You only need to use Navicat to connect to the database and then select a user to change the user's host to a percent sign.