Updated on 2024-05-21 GMT+08:00

Changing a Database Port

Scenarios

You can change the database port of a GaussDB(for MySQL) instance. The change will be applied to the ports of the primary node and read replicas.

Constraints

The database port of a DB instance with read/write splitting enabled cannot be changed.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page, choose Databases > GaussDB(for MySQL).
  4. On the Instances page, click the instance name to go to the Basic Information page.
  5. In the Network Information area, click in the Database Port field.

    Figure 1 Changing a database port
    The GaussDB(for MySQL) database port ranges from 1025 to 65534, excluding 5342, 5343, 5344, 5345, 12017, 20000, 20201, 20202, 33062, and 33071, which are reserved by the system.
    • To submit the change, click .
      • In the dialog box, click Yes.
        1. If you change the database port of an instance, the ports of the primary node and read replicas are changed accordingly and all of them are rebooted.
        2. This process takes about 1–5 minutes.
    • To cancel the change, click .

  6. View the results on the Basic Information page.