Common MySQL configuration files and usage

Ubuntu 18.04 comes with mysql 5.7 along with official repositories

Mysql installed with packages mysql-client-core-5.7 mysql-common mysql-server-5.7 mysql-server-core-5.7

By default you’ll find MySQL’s configuration files in /etc/mysql

location of mysqld.cnf in ubuntu 18.04 is /etc/mysql/mysql.conf.d/

To change default MySQL port from 3306 to another:

go to mysqld.cnf file and edit port and close the file.

restart mysql server :

sudo service mysql restart

check port is changed or not :

netstat -tunlp

Leave a Reply