Error changing mysql 5.6 default port
MySQL 5.6 my.ini file is in the path where the data is stored, in my case 

C:\Documents and Settings\All Users\Datos de programa\MySQL\MySQL Server 5.6 


instead of the path where mysql is install 

C:\Archivos de programa\MySQL\MySQL Server 5.6


, like older versions.

We have to change C:\Documents and Settings\All Users\Datos de programa\MySQL\MySQL Server 5.6 \my.ini file to the changes take effect, and restart the service.

On Windows, MySQL programs read startup options from the following files, in the specified order



More info Using options files



Modifying Registry

As well it is possible to do it in the registry with regedit command

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services


and change binPath



MySQL commands

You can see configuration options through the following command and look up 'Default options' to see the paths where configuration .ini and .cnf are.

&gt; mysqld --verbose --help


And with this other command you can see mysql variables

&gt; mysqladmin variables




Command line

You can also see the default my.ini file that mysql is using by looking at the service properties, in executable path on option --defaults-file.

It is possible to change service through command line
You can use the sc config command to change the path a service points to:

SC CONFIG YourServiceName binPath= "C:\SomeDirectory\YourFile.EXE"


This will update the service called YourServiceName and change the "Path to Executable" entry to C:\SomeDirectory\YourFile.EXE. You will want to restart your service afterwards, which you can do with:

NET STOP YourServiceName &amp; NET START YourServiceName