Changing mariadb port
The right configuration is:

port = 52000


under a [server] or [mysqld] section.

Your most likely problem is that either you are modifying a configuration file that is not being included, or it is being included, but other file is overriding your config (last parsed option wins). Look for other files containing the port definition and delete them, or make sure they are read in the right order.

To check which mysqld config files are applied, you can run mysqld --verbose --help to verify which config files are read. More suggestions at https://stackoverflow.com/questions/580331/determine-which-configuration-file-is-being-used