Change MySQL/Mariadb Default Port and Listening Address

Опубликовано: 25 Март 2025
на канале: Quick Notepad Tutorial
1,372
5

in This Tutorial you will Learn " Change MySQL Default Port and Listening Address"

By default, MySQL and MariaDB listen on port 3306 on the loopback address. It is a good idea to change the MySQL default port for security purposes.

lsb_release -d ; hostname -I ; mysql -V

MySQL - nano /etc/mysql/mysql.conf.d/mysqld.cnf
netstat -tln
bind-address = 127.0.0.1
Port = 9090
systemctl restart mysql

MariaDB - nano /etc/mysql/mariadb.conf.d/50-server.cnf
netstat -tln
bind-address = 127.0.0.1
Port = 9090
systemctl restart mariadb

Code - https://quicknotepadtutorial.blogspot...