Activating configuration changes

The last stop on our highlights tour of MariaDB configuration is how to activate the changes, once we've made them. To do so, we need to reload or restart MariaDB.

In Windows, we perform the following commands to stop and start MariaDB, respectively:

sc stop mysql
sc start mysql

The preceding two commands assume that we set the service name to mysql (the default) during installation. If we set it to a different name, such as mariadb, we would specify that instead.

On Linux systems, the way to activate configuration changes is to reload MariaDB. Traditionally, this is done by doing the following (and we may need to preface it with sudo):

/etc/init.d/mysql reload

However, on some systems, the preferred way to reload MariaDB is as follows:

service mysql reload

One or the other, and possibly both, will work.

We can also use the SET command to temporarily set the options. See the MariaDB Knowledge Base for more information on using this command from:

https://mariadb.com/kb/en/mariadb/set/

Tip

Example my.cnf file

There's an awful lot of information in this chapter about file locations, comments, options, groups, and so on. If you're anything like me, your head is probably swimming, wondering how you're ever going to make sense of it all. To see the big picture view of how everything works together, I've created an example my.cnf file with lots of comments to explain the different parts and settings of a typical my.cnf file. You can download it from the book's website.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.36.38