MySQL Configuration File - Updating and changing the default location of my.cnf
MySQL Option file or Configuration file Most MySQL programs can read startup options from option files (also called as configuration files ). Option files provide a convenient way to specify commonly used options so that they need not be entered on the command line each time you run a program. File path: /etc/my.cnf The mysqld --verbose --help is used to display detailed information about the mysql server's configurations, options, and supported features. To check the contents of the my.cnf file : sudo nano /etc/my.cnf Let's update our configuration file now. We will remove all the comments and one option of 'server-id', for which we will assign the value as 1. To check for the serer-id in MySQL you execute this command: show variables like '%server_id%'; As you can see the server_id is 1. Now let's update this in our option file. In our configuration file we will add the following line: server-id=1 Notice, that our system ...