mysql 5.1 -- unknown variable 'basedir=c:/mysql/'
Thank for posting the my.ini

PROBLEM: You have the basedir and datadir under the [client] section

basedir and datadir are server-only options, not client program options.

SOLUTION : Remove them from under the [client] section and you are good to go !!!

When done, this

[client]
port= new_port

##The MySQL server
Path to installation directory. All paths are usually resolved relative to this.
basedir="C:/MySQL/"
#Path to the database root
datadir="C:/MySQL/"
#Set the default character set.
default-character-set=latin1


should now be this:

[client]
port= new_port


Give it a Try !!!