[SOLVED] How to change the default port of mysql from 3306 to 3360


I want to change the default port number of MySQL server presently it is 3306. I want to change it to 3360.

I have tried:

-- port=3360

But things are not working for me. Please provide query to change port not any configuration. I am using Windows 8 64 bit.


You need to edit your my.cnf file and make sure you have the port set as in the following line:

port = 3360

Then restart your MySQL service and you should be good to go. There is no query you can run to make this change because the port is not a dynamic variable (q.v. here for MySQL documentation showing a table of all system variables).

Answered By – Tim Biegeleisen

Answer Checked By – Mildred Charles (BugsFixing Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *