Bug #97252 Installing MySQL Server with port number other than 3306 is failing
Submitted: 16 Oct 2019 10:16 Modified: 11 Feb 2020 21:18
Reporter: Sailaja N Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL for Windows: Installer Severity:S2 (Serious)
Version:1.4.31 OS:Windows (10)
Assigned to: Jose Ramirez Ruiz CPU Architecture:x86
Tags: MySQL Server Port number

[16 Oct 2019 10:16] Sailaja N
Description:
Hi,

We are installing MySQL Server from command line.
We already have MySQL Server 8 installed and is working
We are trying to install MySQL Server 5.7.27 using command line with following command:
"C:\Program Files (x86)\MySQL\MySQL Installer for Windows\MySQLInstallerConsole.exe" community install server;5.7.22;X64:*:servertype=Server;servicename=MySql57;port=3307;datadir="D:\MySQL\data";passwd=paservice -silent

Even when we mention the port as 3307 in the command(given above), it is still installing server with 3306. We checked this in ini file. Also the log shows the following error and Server is not starting:

[ERROR] Can't start server: Bind on TCP/IP port: No such file or directory
2019-08-19T13:01:32.571676Z 0 [ERROR] Do you already have another mysqld server running on port: 3306 ?
2019-08-19T13:01:32.572762Z 0 [ERROR] Aborting

Note: If MySQL Server 8 is not running, then MySQL Server 5.7 is installing successfully but with port 3306 and not with 3307. But installation is success.
In case MySQL Server 8 is running, the installation is failed.

Please let me know if any other details are required.

Your help in resolving the issue is greatly appreciated.

I have raised the same issue in forums "https://forums.mysql.com/read.php?169,677715,677715".

How to repeat:
Install MySQL Server 8. This will be installed with port number 3306.
Install MySQL Server 5.7.27 using command line with following command:
"C:\Program Files (x86)\MySQL\MySQL Installer for Windows\MySQLInstallerConsole.exe" community install server;5.7.22;X64:*:servertype=Server;servicename=MySql57;port=3307;datadir="D:\MySQL\data";passwd=paservice -silent

Here the port is 3307.
MySQL Server 5.7 is installed but not starting showing as 3306 port is already in use, even when i give the port as 3307 in the command line.
[16 Oct 2019 10:36] MySQL Verification Team
Hello Sailaja N,

Thank you for the report and feedback.

regards,
Umesh
[21 Oct 2019 19:46] Eduard Snitkovskiy
Hello
I have the same problem with the 5.7.28. I tried the following:
1. Stopped MySQL service.
2. Updated the file my.ini by replacing port 3306 with 8406.
3. Started MySQL service.
The status of the service is "Starting..." forever.
Thank you
[21 Oct 2019 19:48] Eduard Snitkovskiy
I meant i tried to work it around, but even that did not work.
Thank you
[21 Oct 2019 20:23] Eduard Snitkovskiy
The last version that work correctly is 5.7.25.
[28 Oct 2019 8:49] Sailaja N
Can you please provide update on this issue.

Thanks,
Sailaja.
[28 Oct 2019 18:24] Eduard Snitkovskiy
Please, see the detailed description:
I ran the command:
"C:\Program Files (x86)\MySQL\MySQL Installer for Windows\MySQLInstallerConsole.exe" community install server;5.7.28;x64:*:type=config;port=8406;servicename=mysqllda;rootpasswd=<password>;datadir="C:\AS\MySQL Data" -silent
The MySQL server was installed, but the port number into the file my.ini was 3306.
I tried to work it around by stopping the mysqllda service, editing the file my.ini (replaced 3306 with 8406), and then starting the mysqllda service. The status of the service was "Starting..." forever.
Thank you
[29 Oct 2019 10:34] Sailaja N
@Eduard Snitkovskiy,

Thank you for the response.
So you say that there is no solution for this issue??

Thanks,
Sailaja.
[29 Oct 2019 12:57] Eduard Snitkovskiy
Hi Sailaja,

I use the 5.7.25 version, which works fine with a not default port number. All the later 5.7 versions does not.

Thank you
[29 Oct 2019 13:11] Sailaja N
Thank you.
I could not find Version 5.7.25.
Older version i found is "mysql-5.6.46" before 5.7.28.
Please send me the location to download 5.7.25 if you have.

Thanks,
Sailaja
[29 Oct 2019 13:52] Eduard Snitkovskiy
The 5.7.25 could be downloaded from the https://downloads.mysql.com/archives/installer/
[30 Oct 2019 7:10] Sailaja N
AS you have mentioned the port is changing to the one we give in the command(below: 3307) only if no other version of MySQL Server is running in the system.
"C:\Program Files (x86)\MySQL\MySQL Installer for Windows\MySQLInstallerConsole.exe" community install server;5.7.25;X64:*:servertype=Server;servicename=MySql5725;port=3307;datadir="D:\MySQL5725\data";passwd=paservice -silent

I Installed MySQL Community and Server 5.6.45, which got installed with port 3306.
Then i tried running the above mentioned command with port 3307 and the same issue as server is starting but never started and in the ini file port is showing as 3306.

Please let me know if any additional information is required.

Thanks,
Sailaja.
[6 Nov 2019 7:18] Sailaja N
Can someone provide me update on this.

Thanks,
Sailaja
[3 Dec 2019 21:51] Jose Ramirez Ruiz
Posted by developer:
 
Fixed issue where the port number was not being overriden when using a value other than the default 3306.
Additionally implemented fix where validation methods such as checking that the port was already in use were not being executed.
[4 Dec 2019 22:16] Eduard Snitkovskiy
What version will contain the fix?
Thank you
[5 Dec 2019 10:13] Sailaja N
Thank you for the update.
Please let us know the MySQL fix Version to check.

Thanks,
Sailaja.
[11 Feb 2020 21:18] Christine Cole
Posted by developer:
 
Fixed as of the upcoming MySQL Installer 1.4.33 release, and here's the proposed changelog entry from the documentation team:

A port number other than the default 3306 added an error to the log for a
MySQL server that was installed and configured using
MySQLInstallerConsole.exe while another server with the default port was
installed. Now, the default port value can be overridden as expected and
all ports in use already are identified.

Thank you for the bug report.