How to change the MySQL port on a local server
Change the MySQL (MariaDB) port in Server by Zaweba from the Ports card in Settings: type the new number and save the ports. Here's how to do it safely.

Changing the MySQL port takes a few seconds in Server by Zaweba. Open Settings, find the Ports card, type a new number in the MariaDB box and choose Save the ports. MariaDB is the database Server uses, and it speaks the same language as MySQL, so this is the setting people mean when they ask about the MySQL port.
The usual reason to change it is a clash. Another database, perhaps one installed with a different local server or a separate MySQL, already has the standard port, 3306, and two programs can't listen on the same one.
Let Server find a free port
Before its services start, Server checks the ports it needs, including 3306, on both IPv4 and IPv6. If one is taken, it tells you which program has it, with its name, process id and path, and whether it's a Windows service. It also suggests a free alternative, for MariaDB typically 3307.
You then choose Use the free ports, Choose ports myself in Settings, or Cancel. The other program is never stopped or touched. For most people Use the free ports is all they need, and they never open the Ports card at all. You can run the same check at any time with Services, then Check ports.
Setting the port yourself
If you'd rather pick the number, go to the Ports card in Settings. It has a box for each service: Web (HTTP), HTTPS, MariaDB, Mail from PHP (SMTP) and the mail web page. Type the port you want for MariaDB.
Each port must be a number from 1 to 65535, and no two services may share one. Check for conflicts on the same card runs the same test as the Services menu, so you can see whether your new number is free before you save. Then choose Save the ports.
Pick something easy to remember and unlikely to be used by anything else. Many developers simply add one to the usual number.
Telling your code about the new port
This is the step people forget. Your PHP code, or the configuration file of whatever framework or content system you use, connects to the database using a host and a port. If it still says 3306, it will try the other program's database, or fail to connect.
The dashboard web page that Server runs on your PC shows the MariaDB connection details, so you can copy the current port from there. Put it in your site's database settings next to the host, then reload the page.
Adminer, the database manager Server includes, opens already logged in from the Databases page or a site's Database button, so you don't need to change anything there yourself.
Changing the other ports
The same card handles every service, so the same steps apply when port 80 for the web server is taken (8080 is a common alternative) or when the HTTPS port clashes. If you change the web port, your sites' addresses include it, and the site cards show the right address to open.
The mail ports work the same way. Mail from PHP is the port PHP's mail() sends to on its way to Mailpit, and the mail web page is where you read what arrived.
Things to keep in mind
Everything Server runs listens on 127.0.0.1, so changing a port never makes your database reachable from the network. It only changes which door on your own PC it uses.
Write the port down somewhere with your project notes. When you come back to a project months later and it can't reach its database, a port that moved is a likely cause, and the dashboard in Server by Zaweba will show you the current one.