why is xampp changing my port code example

Example: how to change the port on xampp mysql

Step 1: First, reach in the folder where you have installed your Xampp Software.

Step 2: After that, go to the destination file – mysql/bin/my.ini (The ‘my‘ file with extension of Configuration Settings)

Step 3: In that file, you’ll be seeing some lines of code like this:

# The following options will be passed to all MySQL clients
[client] 
# password = your_password 
port = 3306
socket = "xampp / mysql / mysql.sock"
Just change the port to 3306 ---> 3308 instead of 3306.

Step 4: Just below, you would find these lines of code:

# The MySQL server
[mysqld]
port= 3306
socket = "xampp / mysql / mysql.sock"
Just like before, here also update the port attribute to 3306 ---> 3308 instead of 3306.

Step 5: And that’s all! Just close off MySQL and Start it again to see the new port working.

Tags:

Php Example