Page 1 of 1

MySql Port does not change

PostPosted: 21. March 2010 13:05
by rehman
Hi people,

I am using xampp 1.7.1 on a Windows Server 2003 machine

I am trying to the MySql port from 3306 to 2215. I am in the mysql bin folder. I have edited the my.ini file and changed the port parameters from 3306 to 2215.

I have restarted the server.

Yet, the port change does not seem to get in effect. I am trying to connect using localhost. There is no firewall.

I can connect via 3306 and unable to connect through 2215.

Here is my "my.ini" file

# Example MySQL config file for small systems.
#
# This is for a system with little memory (<= 64M) where MySQL is only used
# from time to time and it's important that the mysqld daemon
# doesn't use much resources.
#
# You can copy this file to
# C:/Program Files/xampp/mysql/bin/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is C:/Program Files/xampp/mysql/data) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

# The following options will be passed to all MySQL clients
[client]
# password = your_password
port = 2215
socket = "C:/Program Files/xampp/mysql/mysql.sock"

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port= 2215
socket= "C:/Program Files/xampp/mysql/mysql.sock"
basedir="C:/Program Files/xampp/mysql"
tmpdir="C:/Program Files/xampp/tmp"
datadir="C:/Program Files/xampp/mysql/data"
skip-locking
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
log_error="mysql_error.log"

Re: MySql Port does not change

PostPosted: 06. April 2010 23:37
by shoulders
did you have any luck with changing the prot.

thanks

Re: MySql Port does not change

PostPosted: 07. April 2010 00:37
by Narrowboyy
Make sure after editing the xampp\mysql\bin\my.ini file with the changed port details that you restart MySQL in your XAMPP Control Panel.

Also after changing ports, your database host connection details must contain the new port number, for example using the OP's changed port number, in the format localhost:2215 or 127.0.0.1:2215

Re: MySql Port does not change

PostPosted: 07. April 2010 00:50
by shoulders
when i start / restart the mysql service in the control panel it still says 3306. (after changing my.ini)

Thanks for the quick response. I am wondering if the build of xammp has the port number 3306 hardcoded in to it somewhere.

shoulders

Re: MySql Port does not change

PostPosted: 07. April 2010 01:40
by Altrea
the xampp control panel has the ports hard coded in his messages.
Ignore this message and check if your mysql server is accessable with the new port.