[MDEV-13858] Change in Port under windows Created: 2017-09-21  Updated: 2017-09-21  Resolved: 2017-09-21

Status: Closed
Project: MariaDB Server
Component/s: Configuration
Affects Version/s: 10.2.8
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Stuart Slater Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: need_feedback
Environment:

Windows 2008 R1 32bit



 Description   

Hi
When I installed mariaDB 10.2.8 on W2k8 R1 32bit; using the MariaDB .MSI file
I chose to let the installer to create the database for me; I selected Port 3309
after the install; I wanted to change the port to 3306; so I changed it as follows in my.ini:-

[client]
port=3306

[mysql]

[mysqld]
port=3306

; restarted MySQL service.

before I was able to connect with MySQL -u**** -p***** without specifying port
however since changing the port above ; I now need to specify --port=3306 ; I have lots of batch scripts; that don't specify the port so where is the port stored; I have searched the registry for 3309 ; it does not seem to be in an environment variable anyway.

help please where is the original port 3309 stored so I can change it to 3306 please.

many thanks



 Comments   
Comment by Elena Stepanova [ 2017-09-21 ]

Are you using the shortcut "MySQL Client ..." which directly starts mysql.exe, or are you running the whole mysql -u**** -p***** command from the usual command prompt?

Could you please try to launch mysql.exe directly, with --defaults-file=<path to your modified config>?
If it works, then either you're using a shortcut which is somehow misconfigured, or your mysql.exe doesn't automatically pick up the config that you've modified.

Comment by Vladislav Vaintroub [ 2017-09-21 ]

your client is probably not using the correct config file

You can either set MYSQL_HOME environment variable to the directory with correct my.ini
You can dump config file search path with mysql --help --verbose |more
The first output lines would be something like

Usage: client\Debug\mysql [OPTIONS] [database]
 
Default options are read from the following files in the given order:
C:\Windows\my.ini C:\Windows\my.cnf C:\my.ini C:\my.cnf D:\work\10.2\yyy\client\
my.ini D:\work\10.2\yyy\client\my.cnf D:\work\10.2\yyy\client\data\my.ini D:\wor
k\10.2\yyy\client\data\my.cnf

There is no other place the original port is stored than my.ini in the data directory

Comment by Stuart Slater [ 2017-09-21 ]

superb; many for your guidance that did the trick.
I had to log-off my session and back on and all is working fine as it was using the wrong settings.

Generated at Thu Feb 08 08:08:55 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.