title: Change MariaDB 10.5.5 Port
body: <p>I have installed MariaDB <strong>10.5.5</strong> in Ubuntu 20.04 server. Right now I try to change the default port of the database to let say <strong>12345</strong>. When I look into <code>/etc/mysql/my.cnf</code> and <code>/etc/mysql/mariadb.conf.d/50-server.conf</code> there is no <strong>port</strong> options, then I add <code>port = 5505</code> inside <code>/etc/mysql/mariadb.conf.d/50-server.conf</code> under <code>[mysqld]</code>, then I restart the mariadb-server using <code>sudo systemctl restart mysql</code> &amp; <code>sudo systemctl restart mariadb</code>. But when I connect the mariadb server using <code>mysql -uusername -p</code>, it's just connected. The expected behavior is mysql client will reject the connection. I also try to use <code>mysql -uusername -p -P123222</code>, but still connected. My questions is how can I can change the port and prevent this strange behavior to happen?</p>