![]() ![]() ![]() Use the following command: PS C:\> net start MySQL Test Connectivity Using the Command Line Once the my.ini file is updated, we should start MySQL from the Services. Once you find the file, open it with any text editor and add the following line: Port = 3242 In this demo, the location of that directory is C:\MySQL_Home. ![]() The my.ini file is in the MySQL Home directory. We can change the default port by editing the my.ini configuration file. Once the Services are stopped, we’ll edit the configuration file. PowerShell Command PS C:\> net stop MySQL We are using PowerShell commands for that: Stop MySQL Service and Add the Port Number in the my.ini fileīefore we change the default port, we must stop the MySQL Services. Now, let us stop the MySQL service and edit the MySQL configuration file. Specify the Name and Description of the new firewall’s rule in the Name screen.Ĭlick Finish to create the rule and close the wizard. Select Domain, Private, and Public checkboxes and click Next. We want to apply the rule to all network locations. Select Allow the connection on the Action screen. On the Protocols and Ports screen, select TCP and enter 3242 into the Specific local ports field. Click on Inbound Rules from the left pane > New Rule: To create a firewall rule, open the Control Panel > Windows Defender firewall > Advanced settings:Ī dialog box named Windows Defender Firewall with Advanced Security opens. Now, let us understand how to create a firewall rule that allows incoming connections from port number 3242. Start the MySQL Services and test the connectivity using the MySQL command-line tool.Stop MySQL Service and add the port number into the my.ini file.Create a firewall rule to open port number 3242.For that, we must perform the below steps: We are going to change the MySQL Server port number from 3306 to 3242. I have installed MySQL Server on my Workstation and enabled the Windows Defender firewall. I have prepared a lab setup to understand the step-by-step process to change the Port. So, let’s consider changing the default port of the MySQL Server. Ideally, to keep our database secure, we must disable default ports. MySQL Group Replication internal communications MySQL Client API calls to MySQL Router – New X Protocol MySQL Client ReadOnly SQL to Router – MySQL Protocol MySQL Client Any SQL to Router – MySQL Protocol MySQL Workbench MySQL Client to Server New X protocol MySQL Featureįor checks, from Shell to GR server during InnoDB cluster configuration. However, we should keep them all in mind. Note that they are used by different features, and some of them are non-default. Let us have a look at the list of important ports of the MySQL Server. For that, we have to explore some theory and practical tasks. Assume we want to change this default port of MySQL Server on Windows 10. It is a TCP port that is used by the MySQL client connectivity tools. The below table presents the default ports for popular RDBMS: Database Nameįor MySQL Server, the default port is 3306. Test Connectivity Using the Command LineĮvery RDBMS has its default port to accept incoming connections.Stop MySQL Service and Add the Port Number in the my.ini file.In this article, we’ll discuss MySQL ports and learn how we can change the default port on Windows 10. A network port is a communication endpoint used by applications, incoming connections, and external devices to the computer/server or specific application. ![]()
0 Comments
Leave a Reply. |