Home>Article>Backend Development> Steps to modify the MySQL port number in the phpstudy integrated environment under Linux system

Steps to modify the MySQL port number in the phpstudy integrated environment under Linux system

不言
不言 Original
2018-08-06 16:04:20 3060browse

This article introduces to you the steps to modify the MySQL port number in the phpstudy integrated environment under the Linux system. It has certain reference value. Friends in need can refer to it. I hope it will help You helped.

1. First, you need to install the phpstudy integrated environment and start the phpstudy service.
[root@test /]# phpstudy start

2. Log in to MySQL

[root@test /]# /phpstudy/mysql/bin/mysql -u root -p root

3. Check the current port number of MySql

mysql> show global variables like 'port';

4. Modify the port and edit the /etc/my.cnf file. The earlier version may be my .conf file name, add port parameters, and set the port. Note that the port is not used, save and exit. (Some files may have two port numbers, both of which need to be modified)

[root@test etc]# vi /etc/my.cnf 修改完成后 输入 :wq 保存退出。

5. Restart phpstudy.

[root@test /]# phpstudy restart

6. Return to step 3 to verify whether the modification is successful.

Recommended related articles:

How to send emails using PHPMailer (with code)

thinkExplanation of views in the PHP framework (with code) )

The above is the detailed content of Steps to modify the MySQL port number in the phpstudy integrated environment under Linux system. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn